bsc

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

root / semester_1 / tuition-c / APC-S-007.c

APC-S-007.c (568B)


      1 /* Write a program the sum of first 10 natural numbers. */
      2 
      3 /*
      4  * Compiler Note: This source code is specifically designed for compilation
      5  * and execution within the ** Turbo C ** environment.
      6  *
      7  * Testing Disclaimer: Due to a lack of access to the required Turbo C
      8  * compiler software, this code has not been formally compiled or tested.
      9  */
     10 
     11 #include <stdio.h>
     12 #include <conio.h>
     13 
     14 void main()
     15 {
     16     clrscr();
     17     int i, sum = 0;
     18     for (i = 1; i <= 10; i++)
     19     {
     20         sum += i;
     21     }
     22     printf("\nSum of the first natural number : %d", sum);
     23     getch();
     24 }
© 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