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

What does slope represent
Write what you do when you wake up in morning before you go to school in French
Similes, metaphors, and personification are examples of which type of language? literal vivid emotive figurative
pls help is history the question is on top and answers on the bottom​
YO PLZZ HELP!!!!! Lipid synthesis does not occur in any part of the Endoplasmic Reticulum (ER). TRUE or FALSE:
Climate change causes the ice in polar regions to melt , which describes an effect of polar ice melting ?
7. Judy can decorate 3 cakes in 5 hours. Which graph has a slope that best represents the number of cakes per hour Judy can decorate? A Cake Decorating Cake Dec
when did Harriet begin her labors. can someone please help ​
Given two points on a line (2, 5) and (6, 11), what is the rate of change?
Some countries like China have instituted population control measures. Do you think countries should try to limit their population growth? Why or why not? Are t