Computer Science, asked by kalaimadhan127, 11 months ago

write c++ program Microwave oven
A microwave oven manufacturer recommends to increase the heating time by 50% when two items are heated and to double the heating time when three items are heated. Heating more than three items at once is not recommended. Now, write a program to find out the recommended heating time.
INPUT FORMAT:

The first input is an integer which denotes the number of items

The second input is a floating point number which denotes the single item heating time.

OUTPUT FORMAT:

Print the recommended heating time in floating point with 2 decimal places.

If the number of items is more than three, print "Number of items is more".

Refer the sample output for formatting.

SAMPLE INPUT:

2

5.0

SAMPLE OUTPUT:

7.50

Case 1
Case 2
Case 3
Input (stdin)
3
10.0

Output (stdout)
20.00

Answers

Answered by sravani55555
6

Answer:#include<iostream>

#include<bits/stdc++.h>

using namespace std;

int main()

{

int x,z,w,a;

float y;

cin>>x;

cin>>y;

if(x<=2)

{

z=y+(y/2);

cout<<fixed<<setprecision(2)<<z;

}

else if(x==3)

{

w=y*2;

cout<<w;

}

else

{

cout<<"Number of items is more";

}

//Type your code here.

}

Explanation:It passes only two test cases.if you are good at solving another test case.....please answer me

Similar questions
Math, 5 months ago