S2-C-Programs

All major conceptual S2 C-Programs with Algorithms

View the Project on GitHub trulyPranav/S2-C-Programs

Code:

#include <stdio.h>

void main(){
    int a,b,sum;
    printf("Enter the two numbers");
    scanf("%d %d", &a, &b);
    sum = a + b;
    printf("The sum of the two numbers is %d:", sum);
}

Algorithm:

Step 1: Start

Step 2: Initialize a, b and sum.

Step 3: Display “Enter the two numbers”

Step 4: Read two numbers a and b.

Step 5: sum = a + b

Step 6: Display the sum.

Step 7: Stop