Program for Subtraction of two input number using 'C'.

#include <stdio.h>

#include<conio.h>//not necessary

void main()

{

   int num1, num2, sub; //declaration

   printf("Enter first number: "); //for input 

   scanf("%d", &num1);

   printf("Enter second number: "); //for input

   scanf("%d", &num2);


   sub = num1 - num2; //substraction

   printf("Substraction of the entered numbers: %d", sub);

   clrscr();//not necessary

}

Popular posts from this blog

When a method in a subclass overrides a method in superclass, it is still possible to call the overridden method using super keyword - Hacker Rank Solution.

You are given a date. You just need to write the method getDay which returns the day on that date - Hacker Rank Solution.