jamomoja88 jamomoja88
  • 02-01-2022
  • Computers and Technology
contestada

What is the C++ program to display 3 6 9 12 15​

Respuesta :

YBS20
YBS20 YBS20
  • 02-01-2022

Answer:

#include <iostream>

using namespace std;

int main()

{

   

   int n = 15;

   

   for(int i=3; i<=n; i=i+3){

       cout<<i;

       cout<<" ";

   }

   return 0;

}

Explanation:

Used for loop to calculate number and display it. for start with 3(int i=3), increment by 3(i=i+3) and stop when 15 came (i<=n where n is 15).

Answer Link

Otras preguntas

Which of the following statements is true concerning LUCA? (1) LUCA was a cell. (2) All life on Earth evolved from LUCA. (3) LUCA probably existed probably arou
What are the 3 features of a typical seigneurie
“The genetic code is universal.” Explain this statement.
What is biogeography and what does it provide?
How do you Factor c(squared)-8c ??
Which of the following statements is true concerning LUCA? (1) LUCA was a cell. (2) All life on Earth evolved from LUCA. (3) LUCA probably existed probably arou
Find all powers of 4 in range 4 through 1,000
which state of matter has the least amount of energy?
The height of a rectangular prism with a 20 cm by 12 cm base and a 30 cm diagonal.find the unknown dimension
The value square root of 53 of lies between which two consecutive integers?