Answer to Question #291278 in C for Tania

Question #291278

Mr Raman likes to spend the quarantine time with some useful work. he plans to stitch the Mass. he purchases cloth of colour white x cm, cloth of colour black y cm. The white mask takes 12 cm for each mask and the black mask take 10 cm for each mask. How many masks did Mr. Raman stitched. Requirements 1. Capture the size of black cloth y and White cloth x cm. 2. Calculate the number of black mask that can be stitched of size 10 cm. 3. Calculate the number of white Marsh that can be stitched of size 12 CM. 4. Calculate the total masks stitched. 5. Display the total masks.

1
Expert's answer
2022-01-27T13:27:34-0500
#include <stdio.h>
#include <stdlib.h>



int main()
{
    int x;
    scanf("%d", &x);
    int black = x/12;
    printf("The number of black mask is %d\n", black);
    int y;
    scanf("%d", &y);
    int white = y/10;
    printf("The number of white is %d \n", white);
    int total = black + white;
    printf("The total number is %d", total);
    return 0;
}

56
The number of black mask is 4
89
The number of white is 8
The total number is 12

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS