Write a program to accept two numbers and display the sum.

/* Write a program to accept two numbers and display the sum.*/

#include <stdio.h>

void main()

{

    int a,b,c;

    printf("Enter the value of A : ");

    scanf("%d",&a);

    printf("Enter the value of B : ");

    scanf("%d",&b);

    c=a+b;

    printf("The sum of %d and %d is %d\n",a,b,c);

    getch();

}

Comments

Popular posts from this blog

Write a program to accept numerator and denominator and find the remainder without using modulus (%) operator using do..while loop.