Header Ads Widget

C program to subtract two numbers given by user

 C program to subtract two numbers given by user

Given two numbers , write a program to subtract two numbers given by user .

Sample input:-

5 
4

Sample output:-

1

 C program to subtract two numbers given by user

The objective of code is to find the subtraction of two numbers given by user .

Code(C):-

#include<stdio.h>
int main()
{
int a,b,sub;
scanf("%d%d",&a,&b);
sub=a-b;
printf("%d",sub);
}


Output:-

5
4
1




Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

 

Post a Comment

0 Comments