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

is 10 yards less than 360 inches
How is the ecological system organized?
Which sentence correctly forms the plural of the letter R? A. Three R's make up her initials.
Before the Civil War, the cotton plantations of the ___ South depended on British textile companies for their markets.A.antebellumB.anteriorC.avant-garde
The tropical climate zone is in which two states?
Ratio equal to the ratio given 12:7
Please help??? Science SEMESTER REVIEW!!!!In a series of rock layers, a geologist finds fossils of a pine trees and oak trees in layers that are 1.0 m and 1.5
how does  a star form?
three snack bars contain 1/5,0.22,and 19% of their calories from fat. which snack bar contains the least amount of calories from fat ?
The fetus is nourished by the __________ during the first 7 weeks and by the _______ from week 8 through birth ?