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

Use the following function rule to find h(-8b). Simplify your answer.
If three pears and four oranges cost $4.85 and three pears and ten oranges cost $8.75 what is the cost of a pear and an orange
What kind of organism can conduct cellular respiration
If there was no civil war, would America still have slavery?
Write the equation in slope-intercept form that contains the following two points. (4, -1) (-2, 8)
Explain how Radical Reconstruction illustrated the continued conflict between contract and compact political theories
Dominique buys $14.95 worth of gasoline for her car. If the gas station charges $1.43 per gallon, how many gallons did she get? Round to the nearest tenth.
what are the four transportation systems of georgia
A plant with the dominant trait, wrinkled seeds, is crossed with a plant that has non-wrinkled seeds. All of the offspring are all wrinkled-seeded. What is the
How do you figure this out?