Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to add 1 to 10 in c

#include<stdio.h>
#include<conio.h>

int main( void )
{
int a = 0;

for(int i = 1; i <= 10; i++)
{
    a = a + i;
    printf("%d	
", i);
}
printf("The sum of all num is: %d", a);

return 0;
}
 
PREVIOUS NEXT
Tagged: #add
ADD COMMENT
Topic
Name
5+5 =