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 ocean club collects 24.93 kg of trash on the first weekend of the summer. The club collects 18.3 kg the next weekend. How much more trash is collected the
All plots must have _____. themes conflict action dialogue
How does the cell theory describe the levels of organization of living organisms ??? Help plezz and I will be thank to u so much
30-[(9x2)-(3x4)] numerical expression ;)
Hammurabi's Code brought a sense of fairness to his people and established order in society. a. True b. False
provide 3 details on how civilizations develop
How does the cell theory describe the levels of organization of living organisms ??? Help plezz and I will be thank to u so much
if x equals 8-(-2.25) and y equals 6-4.2-(-4.9) what is the value of x-y
What is the role of DNA helicase during DNA replication?
A solution that contains equal numbers of hydrogen and hydroxyl ions would be called acidic basic alkaline neutral