Computer Science, asked by annasusmitha321, 4 months ago

language program.There is a Bucket of water capacity of x litres, which is supposed to fill with a mug of y millilitres water capacity. Say for example x=100 and y=10 then, bucket will get full of minimum of 8 mugs (> 80% and less than 100%>. Bucket filling is to be stopped once more than 80% of bucket capacity is filled. The amount of water taken at a time in mug is not fixed as it can be any value less than or equal to y Notify to stop once bucket is full that is more than 80% of capacity of bucket and count number of mugs poured into bucket. Note that Bucket capacity will always be greater that Mug's Capacity. Example 1: INPUT VALUES 100 this 20 // Enter Bucket capacity in litres as // Enter Mug capacity in litres as this 2 // enter amount of water in MUG one after other as below 20 20 20 20 20 .output values bucket full!no.of mugs:4 .write a problem on c,c++,java

Answers

Answered by vedakumarvysya12345
2

TCS NQT 2020 qn??

I think all are waiting for this??

Answered by shishirrjn
4

Answer:

int X,y;

printf("Enter bucket capacity in lit")

printf("Enter mug capacity in lit")

X=100,y=20;

scanf("%d %d", &X &y);

if (X=X+20)

{

printf("INVALID INPUT")

}

else if

{

printf("%d/100", &X);

scanf("%d", &X);

if (y<=20)

{

printf("BUCKET FULL");

scanf("%d", &y>>20);

}

return 0;

Similar questions