Program to find division of two numbers.

C Programming Language Fundamentals of C Language (Article) Fundamentals of C Language (Program)

3853

Program:

#include"stdio.h"
 
 void main()
	{
	int number1, number2, divResult; 

	printf("Enter two no: ");
 	scanf("%d%d",&number1,&number2);

	divResult = number1 / number2;

        printf("Division result=%d \n", divResult);
    
}

Output:

Enter two no: 10 2
Division result=5
Press any key to continue . . .

Explanation:

Algorithm

  • Step 1: Start
  • Step 2: Declare variable number1, number2 and divResult
  • Step 3: Read Variable number 1, number 2
  • Step 4: Perform operation (divResult = number1/ number2)
  • Step 5: Print divResult variable
  • Step 7: Stop

This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.