Home » Blog » To perform the sum of three numbers and print the sum.

To perform the sum of three numbers and print the sum.

This Program will give basic data type of c and perform sum of this three number.

#include<stdio.h>

void main()
{
    int no1,no2,no3,sum;

    printf("\n\tEnter First Number ");
    scanf("%d",&no1);

    printf("\n\tEnter Second Number ");
    scanf("%d",&no2);

    printf("\n\tEnter Third Number ");
    scanf("%d",&no3);

    sum=no1+no2+no3;

    printf("\n\t_____________________________________________");
    printf("\n\n\tSum Of %d, %d And %d Is %d\n\n",no1,no2,no2,sum);
}

 

Leave a Reply

Your email address will not be published.