Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C language kindly solve all these easy questions correct and clear as soon as possible within 30 minutes. Write a pseudocode for the following process:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

C language kindly solve all these easy questions correct and clear as soon as possible within 30 minutes.

Write a pseudocode for the following process: A cupcake cost RM2.80 each. A program will read the quantity of cupcakes that is requested by a customer and then calculate the discount that the customer will receive. If the number of cupcakes is less than or equal to 5, the discount is 5% of the total price, otherwise is 15%. The program will display the discount and the total price to pay (after discount) to the customer. [4 marks] Your answer Write the codes that will produce the output as below. Use the escape sequences properly. C Microsoft Visual Studio Debug Console Name Age Blood type Fav. Quote : Abi Hurairah : 20 years old : B+ : "To be or not to be" Question 5* 6 points Complete the following C code in Figure 1 representing with label (a), label (b), label (c), label (d), label (e) and label (1) to produce the result shown in Figure 2. #include int main() { label (a) Y, X=2; label (b) (x >= 6) label (c) 6 : x; if (2) { label (d) ",y); printf("Value of y= printf("****"); label (e) label (1) Figure 1 Value of y=2 **t* Figure 2 Question 4* 4 points What is the value of x and t produce based on the following expressions? Show steps of the answer. i) x = 12 + 3 - 4 / 2 %d ", b++); printf ("x ++b => %d ", ++b); printf("x = b * b* a++ => %d ", (b + a++)); printf("x = --a + b 2 => %d ", (-a + b % 2))

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

sponsor any campus programs?

Answered: 1 week ago