increase terminal window

I want to change from 20 steps to 40 by increasing the size of the terminal window. but it doesn't go above 20 everytime i try. How do i solve this? I tried to change a lot!
Pls tell me where i should fix. i dont know whats wrong with it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  #include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main()
{
    double angle;
    double sinVal;
    double numSpaces;
    int numSteps=40;
    double maxAngle=M_PI*4;
    int i,j;
    
    for(i=0; i<=numSteps; i++)
    {      
         angle=(double)i/(double)numSteps*maxAngle;
         sinVal=sin(angle);
         numSpaces=30+sinVal*30;
         printf("%3d:%5.2f",i,angle);  
        for(j=0; j<=numSpaces; j++)
        {
         printf(" ");
    	}
    	printf("*\n");
}
return 0;
}


Thankyou in advance.
Last edited on
Topic archived. No new replies allowed.