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 IS THE RATE OF CHANGE FOR THIS
A plane travels 11,000 miles total. The plane travels at 45 miles per hour. How many hours, days, or both does it take to travel?
Which of the following statements best characterizes Costa Rica's government since 1949? A. Several military dictatorships have ruled the country since 1949. B.
1. x – 5y = -15 Complete the missing value in the solution to the equation (-5, ____)
A two choice sorting device used in taxonomy to identify tax is known as a _____.
1/2-1\3 in simplest form
What’s is the gcf 33c,55cd
Consider a triangular prism. The triangular end has a base of 4 cm and height of 5 cm. The length of each side is 6 cm and the height of the prism (length of th
The value of n is both 5 times as much as the value of M and 36 more than the value of M what are the values of N & M
How did trade help soread islam