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

The table below shows some characteristics of three different types of muscles. Characteristics of Different Types of Muscles Type A Muscles Type B Muscles Type
Jade bought a house for £350 000. In the first year the house price increased by 3% In the second year the house price increased by 2% In the third year the hou
What do you think is the overall message and meaning of Amanda Gorman's poem?
Question : Simplify expres x+3 + 7x-9 ????????
jessie hiked 5(1/2) miles on sunday and 6(3/4) miles on sunday .how many miles did jessie hike altogether ?​
How come the negotiations for peace were so difficult for the Allies?
What is 1’3/4”-2’3/4”
You brought a magazine for $3 and some candy bars for $2 each. You spent a total of $19. How many candy bars did you buy?
2/15ײ-3/4×+6-3/10ײ+2×-15/2
If the exterior angle of a triangle is 150 degrees, what is the adjacent interior angle