Sum of Two Numbers, Plain C
#include <stdio.h> /* * This program reads two numbers from the console and prints the total. */ int main() { // The two input values. int x,y; // Request and read input. printf("Enter an integer: "); scanf("%d",&x); printf("Enter another integer: "); scanf("%d",&y); // Print the total, with proper labels. printf("The sum of %d and %d is %d.\n", x, y, x+y); }