diff --git a/SumOfFirstNno.c b/SumOfFirstNno.c new file mode 100644 index 0000000..827d7e0 --- /dev/null +++ b/SumOfFirstNno.c @@ -0,0 +1,17 @@ +#include + + int main(){ + int a; + int i=0; + int c=0; + printf("enter the value of no till which required to be added\n"); + scanf("%d",&a); + while (i<(a+1)){ + c=(c+i); + i++; + } + printf("result is %d",c); + return 0; + } + +