Sum of Two Numbers in C

This program takes two integers as input from the user and outputs their sum.

#include <stdio.h>

 int main() {
    int a, b;
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);
    int sum = a + b;
    printf("Sum: %d\n", sum);
    return 0;
}

No comments:

Post a Comment

Lists in Python

Introduction: In the realm of Python, lists stand as one of the most versatile and widely used data structures. A list is an ordered, muta...

Post Count

Loading...