Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

tgo

//gcc 5.4.0

#include  <stdio.h>

int main(void)
{
    printf("Hello, world!\n");
    return 0;
}https://play.google.com/store/apps/details?id=vrpatel0018.cprograms


/*Sum of N number and while loop*/


#include<stdio.h>
int main()
{
   int  n,a,i=1,sum=0;
   printf("\nHow many number do you wanted add");
   scanf("%d",&n);
   while(i<=n){
    printf("Enter any number:");
    scanf("%d",&a);
    sum+=a;     //this is similar to sum=sum+a
    i+=1;     //this is similar to i=i+1
   }
   printf("\nSum=%d",sum);
}

 
 run  | edit  | history  | help 0