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

a croquet ball weighs 460 grams. together a golf ball and a croquet ball weigh the same as 11 golf balls.how much does 1 golf ball weigh?
why is mercury usually hard to see without a telescope?
At Video Shack, movie rentals cost $3.99 each. the cost of renting three movies and one video game is $0.11 less than the cost of renting five video games. how
Why wasn't New England's land well-suited for farming
Why wasn't New England's land well-suited for farming
A 2-inch-wide frame is to be built around theregular decagonal window shown. At what angles a and bshould the corners of each piece be cut?
why was the constantinople so important?
At Video Shack, movie rentals cost $3.99 each. the cost of renting three movies and one video game is $0.11 less than the cost of renting five video games. how
At Video Shack, movie rentals cost $3.99 each. the cost of renting three movies and one video game is $0.11 less than the cost of renting five video games. how
what is 2t^3+8t^2-24t in factor form