Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Complete the program below so that it displays the value of n and the message is positive. if n is positive. If n is

image text in transcribed
1 Complete the program below so that it displays the value of n and the message" is positive." if n is positive. If n is negative, the program should display the value of n and the message " is negative." If n is zero, the program should produce no output at all. (6 pts) #include Int main (void) double ni printf ("Enter a number> ") scanf("%lf", &n); return 0 2 Evaluate the following logical expression assuming a is 5, flag is 1 and c is 15 (4 pts) a != 3 && flag 11 c >-10 Note: in c programming, 0 is false and 1 is true 23. Write a nested for loop to display the following shape. (10 pts) 8* 8 **44 24. Write a do-while loop that repeatedly scans integer values until a positive even number is input. You may assume the input data is a list of integers separated by blanks, and that there is a positive even number in the list (6 pts)

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions