Allows the user to enter number that represent month of year

Assignment Help Mechanical Engineering
Reference no: EM13710335

Write a program that allows the user to enter a number that represent the month of a year (1 to 12) and uses a switch construct to convert the month number to its corresponding number of days, where January is considered the 1st month of a year and December is considered 12th month of a year. Print out the resulting days of that particular month. If user inputs the number "2", it should ask back to the user the year and you should calculate if the user input year is leap year or not and print the days of the month of February accordingly. Mat lab

Reference no: EM13710335

Questions Cloud

Neglect kinetic-potential energy changes-compressor power : Air is compressed at steady state from 100 kPa, 300 K, to 600 kPa, 440 K with a mass flow rate of 4 kg/s. Heat transfer occurs at a rate of 42.3 kJ/kg of air flowing to cooling water circulating in a water jacket enclosing the compressor.
What is the mass flow rate of gaseous oxygen : Liquid oxygen (LOX) is used as rocket fuel to launch satellites into space. However, it is easier (and less dangerous) to transport oxygen in gaseous form. What is the mass flow rate of gaseous oxygen that flows at 25 m/s through a 0.5-meter diameter..
Neglecting heat transfer and potential energy : Steam enters a nozzle at steady state at 20 bar and 280°C, with a velocity of 80 m/s. The exit pressure and temperature are 7 bar and 180°C. Mass flow rate is 1.5 kg/s. Neglecting heat transfer and potential energy. Sketch the process on a T-v diagra..
Calculate product temperature at the center : A cooked mashed potato is cooled on trays in a chilling unit with refrigerated air at 2 C blown over the product surface at high velocity. The depth pf the product is 30mm and the initial temperature is 95 C. The product has a thermal conductivity of..
Allows the user to enter number that represent month of year : Write a program that allows the user to enter a number that represent the month of a year (1 to 12) and uses a switch construct to convert the month number to its corresponding number of days, where January is considered the 1st month of a year and D..
What is the amount of the equal monthly payment : Suppose you take out a car loan of $10,000 with an interest rate of 12% compounded monthly. You will pay off the loan in 48 months with equal monthly payments. What is the monthly interest rate? What is the amount of the equal monthly payment?
Take for the buyer to completely pay for the building : A building is priced at $255,000. If a buyer makes a down payment of $55,000 and a payment of $2,000 every month thereafter, how many months will it take for the buyer to completely pay for the building? Interest is charged at a rate of 9% compounded..
What is the displacement of the spring : The cable segment attached to the spring is at an angle of ?=50.0 from the ground. The spring has a spring constant of k=14.5 kN/m. The pulley is attached to the ceiling by rod BD that forms an angle ?=70.0? with the ceiling. The hanging mass causes ..
Energy was dumped into lake erie instantaneously : Assuming 4,686,400,000 MWh of energy was “dumped” into lake Erie instantaneously, what would be the increase in the water temperature of the lake. Assuming all of that energy was dumped to the earth’s atmosphere instantaneously. How thick (i.e. altit..

Reviews

Write a Review

 

Mechanical Engineering Questions & Answers

  If a system has two redundant safety systems with failure

if a system has two redundant safety systems with failure rates of 0.16 and 0.22 faults per year respectively what is

  If the engines provide a constant thrust of t300 kn

a rocket having a total mass of 8 mg is fired vertically from rest. if the engines provide a constant thrust of t300 kn

  A series of cylindrically shaped l 25 mm d 5 mm ceramic

a series of cylindrically shaped l 25 mm d 5 mm ceramic samples are tested are testedin tension. the weibull

  Hub is shrink-fit onto a solid carbon steel shaft

A brittle cast iron (E = 15 Msi, ? = 0.2, Sut = 30 ksi, Suc = 100 ksi) hub is shrink-fit onto a solid carbon steel shaft. The hub has initial inner and outer diameters of 3.000 and 6.000 inches respectively. What is the largest diameter the steel sha..

  Determine the pressure at the bottom of the tank and the

a closed tank contains a liquid sp. gr. 0.80 under pressue. the pressure guage depicted in figure p2.2.7 registers a

  A 2-kw pump is used to pump kerosene rho 0820 kgl from a

a 2-kw pump is used to pump kerosene rho 0.820 kgl from a tank on the ground to another tank 30 m above the ground.

  A 03 kg softball has a velocity of 15 ms at an angle of

a 0.3 kg softball has a velocity of 15 ms at an angle of 35deg below the horizontal just before making contact with the

  Explain why the modulus of elasticity of simple

explain why the modulus of elasticity of simple thermoplastic polymers such as polyethylene and polystyrene is expected

  The left steel section has a 120 mm diameter and is 500 mm

the shaft consists of two sections with 8.5 knm of torque applied clockwise at the joint. the left steel section has a

  A 27 cm diameter rod consists of three cylindrical segments

a 2.7 cm diameter rod consists of three cylindrical segments placed end to end in intimate contact aligned aong a

  Two rods made of copper and steel are positioned between

two rods made of copper and steel are positioned between two rigid walls as shown. calculate the force in the rods if

  Water is the working fluid in an ideal rankine cycle

1. water is the working fluid in an ideal rankine cycle. superheated vapor enters the turbine at 10 mpa 4800c and the

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd