Sunday, 5 December 2021

division of two variables

 #include<stdio.h>  


int main()        
{
    int a;      
    int b;

    printf("enter the first number a\n");
    scanf("%d", &a);

    printf("enter the second number b\n");
    scanf("%d", &b);

    printf("the answer is %d\n", a/b);    
    return 0;

}
// project:_5 (division)
// price of one dozen bananas
// what is the price of 1 banana
#include <stdio.h>
int main ()
{
    int d;
    printf ("enter the price of one dozen bananas: ");
    scanf ("%d", &d);

    printf ("price of one banana will be: %d", d/12);
    return 0;
}
output:_ enter the price of one dozen bananas: 144 price of one banana will be: 12

No comments:

Post a Comment

here we are to help you.you can watch videos and get information about :- (1) scientific facts (2) education (3) gaming (4) music (5) lyrics (6) cartoons and many more.So keep watching keep learning, thank you.

Recurtions

  //Why are recursions? //We can solve difficult long iteratively can be solved simply recursively. // there are some problems which suite...