Thursday, May 19, 2016

A c program for division of two numbers

Program
#include<stdio.h>
main()
{
int a,b,ratio;
printf("enter the values of a and b: \n");
scanf("%d%d",&a,&b);
ratio=a/b;
printf("division is %d",ratio);
}

Output
enter the values of a and b
6 2
division is 3 

No comments:

Post a Comment