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 innovation had the GREATEST impact on westward migration immediately after the American Civil War
What lead France and Britain to declare war against Germany to begin World War II
Did the South have the right to secede from the Union? Explain.
Please Help!!!! The two box-and-whisher ploys below show the score on a math exam for two classes. What 2 things do the interquartile ranges tell you about the
How many different triangles, if any, can be drawn with side lengths of 2 cm, 4 cm, and 7 cm?
2/3 yd=_ft? THIS IS 10 POINTS!
determine the product of (x+11)(x-7)
The meeting of people as a romantic engagement is known as a. courtship. c. socialization. b. dating. d. none of the above
determine if the ordered pair is a solution of the equation is (-1,4) a solution of y =-2×+2? true or false​
What are the advantages and disadvantages of third-person omniscient point of view?