Question

The power of the microwave can be calculated as follows: Power=Work Time Work is measured in joules (I) and time is measured

i need it in c++ coding

Using c ++ language

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream.h>
void main()
{
float power,work,time;
int i;
cout<<"How much work does microwave do in Joule?";
cin>>work;
if(work<=0)
{
cout<<"Invalid work value, Enter a value greater than zero: ";
cin>>work;
}
cout<<"How much time it takes in seconds?";
cin>>time;
if(time<=0)
{
cout<<"Invalid Time value, Enter a value greater than zero: ";
cin>>time;
}
cout<<"Time(seconds)"<<"\t"<<"Power(watt)";
for(i=20;i<=time;i=i+20)
{
power=work/i;
cout<<endl<<i<<"\t\t"<<power;
}

Screenshots:

203 DOSBox 0.74, Cpu speed: max 100% cycles, Frameskip 0. Program: TC File Edit Search Run Compile Debug Project Options Wind
}283 DOSBox 0.74, Cpu speed: max 100% cycles, Frameskip 0. Program: TC How much work does microwave do in Joule? Invalid work

283 DOSBox 0.74, Cpu speed: max 100% cycles, Frameskip 0. Program: TC How much work does microwave do in Joule? Invalid work value, Enter a value greater than zero: 24000 How much time it takes in seconds? Invalid Time value, Enter a value greater than zero: 80 Time(seconds) Power(watt) 20 1200 40 600 60 400 80 300

Add a comment
Know the answer?
Add Answer to:
i need it in c++ coding Using c ++ language The power of the microwave can...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please solve this coding in C++ language. Create a library with the following functions (prototypes and...

    Please solve this coding in C++ language. Create a library with the following functions (prototypes and descriptions are given): - double energyToHeatWater(double mass, double deltaT); // returns the heat, in joules, required to heat “mass” (in grams) of liquid water at atmospheric pressure by “deltaT” degrees C. The function should limit the maximum deltaT to 100C as a larger value is not possible for liquid water at atmospheric pressure. - double energyToBoilWater(double mass); // returns the heat, in joules, required...

  • C# Goals: Practice building a class Use object oriented programming to solve a problem Problem Description:...

    C# Goals: Practice building a class Use object oriented programming to solve a problem Problem Description: Create a Windows Console Application using the .NET Framework For this application you will be designing a program that allows users to keep track of robot inventory. First, you will design a Robot class, and then build an application that creates Robot objects. Important formulas / relationships: Before we begin designing robots, we should understand a few key electrical terms and relationships. Terms: Voltage...

  • SHOW WORK/Explain (need help in bold) Weight in N = 600N Weight in lbs. = 132lb...

    SHOW WORK/Explain (need help in bold) Weight in N = 600N Weight in lbs. = 132lb 2. Before doing any measurements, estimate how much force your hands are applying to the ground when doing a push up. Estimated Force applied by both hands to the ground = 200 Newton. 3. Measure how much force your hands actually apply to the ground by one for each hand. Put one hand on the force plate, and another on a book or books...

  • Section I: First Order Systems 1) A microwave oven is used to heat a cylindrical glass...

    Section I: First Order Systems 1) A microwave oven is used to heat a cylindrical glass beaker completely full of water. The magnetron tube generates 800 watts of thermal power, all of which is absorbed by the water. The glass beaker sits on a thermally insulated plate. As the microwaves increase the temperature of the water, the beaker temperature will also increase due to conduction and convection from the Mode Stirrer Wave Guide Magnetron Tube (source of radiation) Oven Cavity...

  • 2. How long does it take a 19 kW steam engine to do 6.8 × 107...

    2. How long does it take a 19 kW steam engine to do 6.8 × 107 J of work? Ans: ________________________________ 3. A truck weighing 30,000 N was driven up a hill that is 1600 m long to a level area that is 800 m above the starting point. If the trip took 480 s, what was the minimum power required? Ans: ________________________________ 4. A motor used 120 W of power to raise a 15 N object in 5 s....

  • Conservation of Energy/Power Problem: The Sears tower has elevators that weigh 1000kg each. If the elevator...

    Conservation of Energy/Power Problem: The Sears tower has elevators that weigh 1000kg each. If the elevator is lifted 400m to one of the upper floors in a total of 15s. (You will need to use the kinematic equations for some parts of this problem) Part 1. How much Power must the engine doing the lifting be rated for? Give your answer to the nearest kilo-Watt (1 kW = 1000 W). kW Part 2. What is the Potential Energy of the...

  • A toy elevator is raised from the ground floor to the second floor in 20 seconds....

    A toy elevator is raised from the ground floor to the second floor in 20 seconds. The power need using 1000 J of work, is 20,000 W. 100 W. 50 W. 1000 W. 20 W. It is correct to say that impulse is equal to a corresponding change In momentum. force multiplied by the distance it act velocity multiplied by time. momentum. A skydiver steps from a helicopter and falls for a few seconds until terminal velocity is reach Thereafter,...

  • I need help writing this code in C++ and I’m using xcode for mac the objective...

    I need help writing this code in C++ and I’m using xcode for mac the objective is in the first picture and the rest is a sample output of the code thaf needs to be similar bjectives: . Perform C++ string object manipulation Understand how to manipulate data using arrays of structs Handle input errors and invalid values Design and create a wel-structure program using C++ basic programming constru Description: Write a menu-driven program that provides the following options 1....

  • C Programming Quesition (Structs in C): Write a C program that prompts the user for a...

    C Programming Quesition (Structs in C): Write a C program that prompts the user for a date (mm/dd/yyyy). The program should then take that date and use the formula on page 190 (see problem 2 in the textbook) to convert the date entered into a very large number representing a particular date. Here is the formula from Problem 2 in the textbook: A formula can be used to calculate the number of days between two dates. This is affected by...

  • A helicopter, starting from rest, accelerates straight up from the roof of a hospital. The lifting...

    A helicopter, starting from rest, accelerates straight up from the roof of a hospital. The lifting force does work in raising the helicopter. An 760-kg helicopter rises from rest to a speed of 10.0 m/s in a time of 5.0 s. During this time it climbs to a height of 8.9 m. What is the average power generated by the lifting force? Bicyclists in the Tour de France do enormous amounts of work during a race. For example, the average...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT