Monday, 15 June 2015

Finding quotient and remainder.

WAP that will take dividend and divisor and display the quotient and remainder.


#include <stdio.h>

#include<conio.h>

int  main()

{

   int dividend,divisor,remainder;  //Declaring Variable.

   float quotient;   //Declaring Variable.

   printf("enter any dividend and divisor \n");   //Printing Message on Screen

   scanf(“%d%d”,&dividend,&divisor);     //For Input.



   quotient=dividend/divisor;  //Calculation

   remainder=dividend%divisor;

   printf(“\n The quotient is %f and remainder is %d” ,quotient,remainder); //Printing 
   getch();  //Getting a chracter or waiting for key press.
   return 0;
}


Video Explanation

Sorry Guys Explanation of this tutorial will be posted later this month.

No comments:

Post a Comment