knowledgediarybd.com

Your Virtual Knowledge Campus

Division ,Remainder of Two Integer and Floating Point Number

Dear Reader,Here are Some C Program about Division ,Remainder of Two Number or Floating Point Number

#A program that divide two integer

#include<stdio.h>

int main()
{
int a,b; //variable declaration
printf("a= ");
scanf("%d",&a);
printf("b= ");
scanf("%d",&b);

printf("Division= %d",a/b);
return 0;
}

#A program that read and divide two floating point numbers

#include<stdio.h>

int main()
{
float a,b; //variable declaration
printf("a= ");
scanf("%f",&a);
printf("b= ");
scanf("%f",&b);

printf("Division= %f",(float)a/b);
return 0;
}

#A program that read two integer and display remainder

#include<stdio.h>

int main()
{
int a,b; //variable declaration
printf("a= ");
scanf("%d",&a);
printf("b= ");
scanf("%d",&b);

printf("MOD= %d",a%b);
return 0;
}

More Similar C Program:

#A program that read any character and display ASCII value,Lower case and Upper case Character.

#A program that read two integer and display summation, subtraction,

multiplication.

Related Post or  you may like:

knowledgediarybd.com © 2017
shares