C Program Odd Number Series
/* Write a program for following Series: 1 + 3 + 5 +… + n */
#include <stdio.h>
int main(void) {
int n;
printf("Enter Value of n :");
scanf("%d",&n);
printf(" Total Sum = %d",(n*n));
return 0;
}
#include <stdio.h>
int main(void) {
int n;
printf("Enter Value of n :");
scanf("%d",&n);
printf(" Total Sum = %d",(n*n));
return 0;
}
Comments
Post a Comment