Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer all Q PLZ answ. Q 4, 5, 6,7 1. Write the result of the following statements assuming the following declarations: int numl; float num2:

image text in transcribed
image text in transcribed
answer all Q PLZ
answ. Q 4, 5, 6,7
1. Write the result of the following statements assuming the following declarations: int numl; float num2: S. No Expression Result 1 num 1=3-(6+4)/2; 2 numl=14%5*4+5 * 2: 3 num2=6/8+ 7,0/2 - 19%6; 4 num1-4.8*2/1.5-5 3/7: num2=9/2.6+1)*3+ 2.2; Write the result of following operations. S. No Expression Result 1 int a -11; x=+a%3: 2 int a -11: 2. X- 3 4 4 int a -7; Xat: int x = 13; X-2: int y - 13, 2-2 z+++y/4: 5 Z. #include void main() EECP1290 Computer Programming For Engineering #include void main() int i-2.j: j-sitt inti-10; i%= 2: printf("%d".1); printf("%d %d", 1:1 #include void main() #include void main() int a, b, result a = 10; b-15: resulta! b?a/b: ba; printf("Result =%d", result); int a, b, max: a 15: b= 25; max arb? a:b: printf("Maximum =%d", max); 4. 6. Write a C program that reads the Velocity(v), Timelt) and Acceleration(a) of a moving object and calculates and prints the displacement(s) according to the following formula: s=vt+(1/2)at Write a program that calculates the total Money (m) to be paid by a customer of a supermarket if she/he has bought a Quantity (q) of an item of a Unit Price (p) and the customer has been given a Discount Percentage (d) using the following formula: mqp(1-1/100) Write a program that enters the width and height of a Right Angle Triangle and calculates its Perimeter and prints the result. Perimeter of a Right Angle Triangle-width-height+width + height? Write a program that inputs the radius (r) and the height (h) of a Cone and calculates its Surface Area and Volume then it prints the results. Surface Area of a Conearer +vr7 + h) Volume of a Cone =-xr1 Write a program that inputs the total amount in hand in Baizas and convert it to OMR and Baizas. Sample output Enter money in hand: 2400 B2 2 OMR 400 B2 7. 8 ENGG_CC_LECTURE NOTES_01Sep2020_V03 Page 39 of 97 70 of 127

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What does the approach of DM as practice focus on?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago