Write a program to evalute the series.
1+3+5+7+........+n
#include <stdio.h> int main() { int n = 0; printf("Input n\n"); scanf(n); for (int i = 0; i < n; ++i) { n += i; } printf("n = %d",&n); return 0; }
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment