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 suspend a brass ring from a spring scale. Its weight is 0.83 n while it is suspended in air. Next, you immerse the ring in a container of light corn syrup.
Why did nationalism increase rivalries between European nations
write an inequality statement using greater than an less than to compare 0.008 and 0.01
World history is the story of human choices that link the past to the present and influence the .
what is the mass of 9.0 x 10^17 molecules of He gas at STP
How can you prove a triangle is an equilateral triangle?
Which of the following is the medium which creates oxbows? water wind ice gravity
what is 34 less than the product of 14 and a unknown number of is 78. what is the unknown number?
Hydrogen reacts with an element to form a compound. Which element would have the most electrons available to react with hydrogen? a. oxygen b. chlorine c. ne
Name four ways in which the ancient civilizations were similar