Vs Code
#include <stdio.h>
int main()
{
int c, t = 0;
for (c = 0; c < 10; c++)
{
t = t + c;
}
printf("The sum of ten natural number is : %d\n", t);
return 0;
}
Turbo C++
#include <stdio.h>
#include<conio.h>
int main()
{
int c, t = 0;
clrsce();
for (c = 0; c < 10; c++)
{
t = t + c;
}
printf("The sum of ten natural number is : %d\n", t);
getch();
return 0;
}
0 Comments