it looks funky in variables but it works .i have tried it .
i an a learner if it is wrong sorry for the time u wasted .
#include<stdio. h>
#include<math.h >
main()
{
int n,b,c,totalsum;
printf("Entre the value of n");
scanf("%d",&n);
for (b=1;b<n;b++)
c=n/2;
totalsum=c*c;
printf("The sum of odd numbers up to %d is...
Leave a comment: