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 domains and ranges of the graphs
How many ways can a committee of five be chosen from 120 employees to interview prospective applicants.
What is the difference between an argument and a parameter variable?
Guided transmission media employ an antenna for transmitting through air or vacuum. a) True b) False
Select the graph of the solution. Click until the correct graph appears. {x | x < 4} ∩ {x | x > -2
The procedure for making homemade lemonade is quite easy. First, combine one cup of sugar with one cup of water. To make a simple syrup, heat the mixture until
What is the difference between an argument and a parameter variable?
When 23Na is bombarded with protons, the products are 20Ne and A. a neutron B. an alpha particle C. a deuteron D. a gamma ray particle E. two beta particles
Which causes food poisoning? viruses bacteria protozoans fungi
when did the titanic sink?​