Solution for Exercise 10-7
ex1007
#include <stdio.h>
void graph(int count);
int main()
{
int value;
value = 2;
while(value<=64)
{
graph(64);
printf("Value is %d\n",value);
value = value * 2;
}
return(0);
}
void graph(int count)
{
int x;
for(x=0;x<count;x=x+1)
putchar('*');
putchar('\n');
}
Output
****************************************************************
Value is 2
****************************************************************
Value is 4
****************************************************************
Value is 8
****************************************************************
Value is 16
****************************************************************
Value is 32
****************************************************************
Value is 64
Copyright © 1997-2026 by QPBC.
All rights reserved
