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

What are the 4 main products for southeast
water in a pan over a radiator evaporates much faster than a water pan in a table ???? i need help ppl
Can someone help me in probability?Amanda wrote a computer program that generates two random numbers between one and eleven.When she runs it,what is the probabi
How did New England's physical geography help the growth of industries?
What is the 54th element on the periodic table?
How did New England's physical geography help the growth of industries?
Why did populations soar between 1800 and 1900?
What's an equivalent fraction for 10 15 by dividing
Use the order of operations and the digits 2,4,6 and 8 to create an expression with a value of 2
What is the property, transformation, or simplification used in each step of this problem?    x-7=34