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.
#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
Comments
Leave a comment