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

Explain why the graph y < X cannot lie in quadrant II
Which phrase best describes osmosis? A. the process where DNA is created B. the movement of molecules through the cell membrane C. the division process of the c
x^2-9x+8 what is the Factor to this problem
Which phrase best describes osmosis? A. the process where DNA is created B. the movement of molecules through the cell membrane C. the division process of the c
integer problems that equal 36
What is another word for Acadians
What does each of the facts shown above tell you about the element on the periodic table
Which set of points lies on the given graph? A. (5, 13), (1, 1), (2, –1) B. (5, 13), (–1, 1), (2, 1) C. (–5, 13), (1, 1), (2, –1) D. (–5, 13), (1, 1), (2, 1
Are the given lengths 24, 60, 66, sides of a right triangle?
Write five names for 1/4