bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / P057.c

P057.c (574B)


      1 /* WAP to display the series using user defined method.
      2     0, 7, 26, 63, ... upto n terms using void series(int n)
      3 */
      4 
      5 // This code has not been compiled.
      6 // If you find any issues, please create a new issue on GitHub regarding them.
      7 // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues
      8 
      9 #include <stdio.h>
     10 
     11 void series(int n)
     12 {
     13     int i;
     14     printf("\nSeries:  ");
     15     for (i = 1; i <= n; i++)
     16         printf("%d  ", (i * i * i) - 1);
     17 }
     18 
     19 int main()
     20 {
     21     int n;
     22     printf("Enter n: ");
     23     scanf("%d", &n);
     24     series(n);
     25     return 0;
     26 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror