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

Was Adolf Hitler a good social leader or a poor social leader?
Why Mushroom cannot be kept in the division algae​
What is the following product? Assume b>0. Square root of b x square root of b
Are there any side effects of insulin injection in a long way?.
The diagram shows a type of lipid. Which type of lipid is shown? a saturated phospholipid a saturated triglyceride an unsaturated phospholipid an unsaturated t
can I have help with the problem in the picture pls​
What happened during the siege of Constantinople 1453?.
Aaron drew a cone that has a volume of 90in.If Armani drew a cylinder with the same base and height as Aaron's cone, what is the volume of her cylinder? Explain
Please write out the answer instead of using the letter Which diagram shows an effect of Henry Clay's American System? Cause Effect led to O A. Canal building D
What are some examples of commensalism in animals?.