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 28 29 | #include<stdio.h> void series(int num); int main(void) { int n; printf("enter your number : "); scanf("%d", &n); printf("\n"); series(n); return 0; } void series(int num) { for(int i=1; i<=2*num; i+=2) { for(int j=1;j<=i;j+=2) { printf("%d+", j); } } printf("\n"); return ; } |
Friday, 20 March 2015
Odd Number Series
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment