Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve this and also send me program too. Thank you Q.No.2: [4 marks] You have two variables (a , b) in the main function.

Please solve this and also send me program too. Thank you

image text in transcribed

Q.No.2: [4 marks] You have two variables (a , b) in the main function. Assign the last digit of your arid number to variable a and 2nd last digit to variable b. Pass addresses of these two variables to a function. The function will swap the values of these variables using the addresses it receives from the main function. Display the swapped value of the variables in the main function. Add screen shot of your program output after the code. Answer Q. No. 2: Q.No.3: [2+2+4=8 marks] You want to buy carpet for your home having three rooms. Rooml is labeled as your name, Room2 as labelled as your brother name and Room3 is labeled as your father name. There are many types of carpets available in the market having different prices. Assume you consider four types of carpets available in the market: Price of type 1 is 20 Rs per square feet. Price of type 2 is 25 Rs per square feet. Price of type 3 is 30 Rs per square feet. Price of type 4 is 40 Rs per square feet. You have a total budget of 20 thousand to buy carpet for all the three rooms. A) Input the length and width of each room in feet and display area of each room along with its label. B) Display the total area of all the three rooms. c) Your program will suggest the carpet type that you can buy for the three rooms in your allocated budget. You can use switch statement, loops, structure, functions etc. better organization of your program will carry high marks. Answer Q. No. 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions