Responsive Ads Here

Tuesday, November 25, 2014

Quotient and Remainder

Quotient and Remainder

 

#include<stdio.h>
 
int main()
{
    int a,b,Quotient,Remainder;
    printf("Enter your numbers: \n");
    scanf("%d%d",&a,&b);
    if (b==0)
    {
        printf("\n\nError!! can't divide\n\n");
    }
    else
    {
        Quotient=a/b;
        Remainder=a%b;
        printf("\nQuotient= %d\nRemainder=%d\n",Quotient,Remainder);
    }
 
    return 0;
}

No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...