Subtraction of two numbers in C Language

 C Language


Subtraction 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 :

Num1 = 234

Num2 = 200

Result = 34





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.

Post a Comment

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!