bsc

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

P057.c (710B)


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