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

Which of the following was used in the 1940s to analyze amino acids that make up proteins? A. Genetic engineering. B. Chromatography. C. Radioactive tracers.
do aquaporins require a living cell in order to function?
Which detail most clearly belongs to the conclusion of "The Monkey's Paw"?
What's the distance between the points (-3,11) and (5,5)
What are the five types of materials used to make welding rods?
What appeal does he primarily use here?
how did the scientific revolution change the way Europeans viewed the universe and the place of human beings in it
What information and measurements would you need to calculate the rate of movement?
Paine most likely wrote The Crisis, Number IV in order to
Both historical and feminist criticisms a. look for repeated words and ideas. b. are concerned with language and form. c. seek to understand the role of gen