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

2(u+3v)=w-5u, what is u in terms of v and w
What was the goal of the Americanization movement?
Solve for the variable X=5y for y
Please solve number 27.) -5(3-q) +4 =5q-11
12/2 as a whole number or mixed number
what is the outlet of a river called
In an examination there are four multiple choice questions with 3 options each, of which one option is the correct answer. In how many ways can a student answer
A car is driven 100 kilometers in the 1st week, 130 kilometers in the 2nd week, 160 kilometers in the 3rd week, and so on. What will be the total distance trave
Population density is the number of people per unit of area. What is the population density of a state that has 1627260 people in 1490 square miles? Round to th
How many Jews did Adolf Hitler killed