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

Excerpt from The Pet Cloning Controversy Sean Putman 6 Cloning also brings many pet owners great joy. Nicky was a beloved Maine Coon cat owned by a woman in T
what the value of the expression 4x^3 when x = -2 A.32 B.24 C.-32 D.-24
A car sales person is . a base salary of 35,000 a year +8% of sales what are the sales needed to have an annual income greater than 65,000
on average 1 1/3 bushels od seed are needed to plant 1 arce of wheat. how many bushels of seed would be required to pay it arces?
7(4+5+2)-6(3+5) evaluate the expression
That which type of boundary do lithospheric plates collide
how do convection currents form in air?
5208 divided by 4 in long division
Economic globalization forces local companies to compete with(private,domestic,or foreign) businesses. To compete, businesses strive to offer the best quality a
how to do the problem step by step