An algorithm to find the sum of two numbers in C Language

C Language


An algorithm to find the sum of two numbers in C Language :

#include<stdio.h>

main()

{

//Declare variables

int num1,num2,sub;

//Reading 1st number

printf("\nEnter 1st number:");

scanf("%d",&num1);

//Reading 2nd number

printf("\nEnter 2nd number:");

scanf("%d",&num2);



sub=num1+num2;

printf("\n Subtraction of Num1 & Num2 =%d",sub);



}

Output :





Vishvesh Shivam

Vishvesh Shivam is the dynamic founder of TheVsHub.in, a platform he is continually refining with his passion and dedication. A web developer and student based in the scenic Himachal Pradesh, Vishvesh embodies self-reliance and innovation. His quick decision-making ability and relentless drive set him apart, fueling his mission to elevate TheVsHub.in every single day.

2 Comments

We Love Hearing from You!
Thank you for reading our post! Your thoughts and opinions are important to us. Please leave a comment below to share your feedback, ask questions, or start a discussion. We look forward to engaging with you!

Note: Comments are moderated to ensure a respectful and positive environment.

Previous Post Next Post
Code Copied!