C Program to Calculate the Sum of Natural Numbers up to 100



C Program to Calculate the Sum of Natural Numbers up to 100 for neb class 12 Computer science.

#include<stdio.h> 
#include<conio.h> 
void main() 
int i, sum = 0; 
for(i=1; i<=100; i++) 
sum=sum+i; 
printf("The sum of numbers from 1 to 100: %d", sum); 
getch(); 


Explore More C  Programming tutorial  
Founder of Notehubs Nepal, Software Developer, Content Creator, Graphic Designer

Post a Comment

© Notehubs Nepal. All rights reserved. Distributed by ASThemesWorld