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

An empty graduated cylinder weighs 82.450 g. when filled to 50.0 ml with an unknown liquid it weighs 11-.810 g. what is the density of the unknown liquid?
How do you graph y= -5
Suppose that a cyclist began a 364 mi ride across a state at the western edge of the​ state, at the same time that a car traveling toward it leaves the eastern
One characteristic of the romantic period was A: an interest in innovation B: the use of self-control C: an emphasis on order D: the use of imagination
An element with partially filled P orbitals is called a ________?
Which postulate would you use to justify that triangle XYZ is similar to triangle XAB?
What type of ceramics is used for making bricks?
Help? Please? My algebra teacher does not teach well... that's why I'm here
The important points that are given to prove the main point are essential _____.
Why did major league baseball owners support segregation by 1890?