Answer to Question #337866 in UNIX/Linux Programming for Raphael Caamano

Question #337866

You need to submit the code and program output

Q1. you will write a program that uses a for statement to calculate and display the sum of all odd numbers between 6 and 27 inclusive on the screen. 


Q2. Write statements that assign random integers to the variable n in the following ranges: Use the random function to generate the numbers. Put the statements in a C++  Program and run it.


  1. a) 1 ≤ n ≤ 54
  2. b) 1 ≤ n ≤ 910
  3. c) 0 ≤ n ≤ 194
  4. d) 1000 ≤ n ≤ 3125
  5. e) –19 ≤ n ≤ 31
1
Expert's answer
2022-05-09T05:21:01-0400

Q2 output:

a) 20

b) 257

c) 102

d) 1907

e) 13



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS