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

Which statement is true? A. Federal student loans are based on financial need. B. Grants are awarded only for athletic ability. C. Scholarships must be repaid w
A unified group of countries, the Communist bloc, was located in what world region?
Which compound is classified as a hydrocarbon?(1) ethane (3) chloroethane(2) ethanol (4) ethanoic acid
Which characteristic is a property of molecular substances? (1) good heat conductivity(2) good electrical conductivity(3) low melting point(4) high melting poin
F=gMv^2/r solve for v
What is the solution for the gravitational pull on earth?
Solve the inequality. 6y+5>8
is 5 yards and 1 feet greater then 192 inches
In the giver what values does the books society embrace and encourage
Which ancient Chinese philosophy started first?