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

Guys help me I need help what is 5/6 divided 1/2
If the measure of angle 5 is (11x-14) and x=6, which expression could represent the measure of angle 2? Answer choices: (8x+4) (9x+2) (20x+8) (18x+20)
Need help please! Be a helpful person​
what did scientist observe when they studied the magnetic fields of rocks on the sides of mid ocean ridges?
The war bond drive alone raised over for the U.S. war effort. A. $10,000,000 B. $100,000,000 C. $10,000,000,000 D. $100,000,000,000
Solve for x4d+3/8=-2​
From sentencesof prendre,with theapprendreconjugated form.and comprendre​
SUM ONE HELP ITS MY EXAM Question 7(Multiple Choice Worth 3 points) (02.05 MC) Which of the following is true of the executive branch? It can decide who gets to
PLEASE ANSWER ASAP *picture attached*
The quotient of some number divided by 56 is 2. What is thenumber?​