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

You are planning to save for retirement over the next 35 years. To do this, you will invest $770 a month in a stock account and $370 a month in a bond account.
Aniyah spent $36 on snacks for Super Bowl Sunday and had $12 left. What percent of her money did she spend?
85 percent of what number is 17
Is this right????? Plzzz help with all of them
Overcrowding and unsanitary conditions can cause epidemics of: rocky mountain spotted fever ringworm typhus all of the above
What is 2 3/8 simplified?
Jerry’s new car has a list price of $22,415. The sales tax in Jerry’s state is 8.75%, and he is responsible for a $1,925 vehicle licensing fee and a $79 documen
The famous book on economics, The Wealth of Nations, was written by _____.
Simplify (2v-7x)^2 then rewrite
in which sentence are the conjunctions used correctly