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

If an organism is 2n=54, how many chromosomes will be in each if it's gametes?
pls answer! thank uuu
Which of the following accurately describes covalent bonds? A. Covalent bonds are formed when atoms share one or more electrons. B. Covalent bonds are formed wh
Helppp hellppp helppp pleasee
Whal5)frequency in physics.​
¿Qué efecto tuvo para las arcas fiscales la integración de los territorios ricos en salitre?¿en qué crees que el Estado chileno destino dichos fondos?
PLZZZZZZ HELPPPPPPPPP
Show how √x3 works with the product property of square roots.
January 2, 2018, Cullumber, Inc. purchased a patent for a new consumer product for $810000. At the time of purchase, the patent was valid for 15 years; however,
Enter a decimal that equivalent to 6/100