Sammy288
Sammy288 Sammy288
  • 15-06-2022
  • Computers and Technology
contestada

Write a for loop that displays the following numbers exactly like this (you must use a loop):

3 7 11 15 19

Hint: notice the pattern of the numbers

Respuesta :

philjackson11 philjackson11
  • 15-06-2022

Answer:

while (true)

{

   print(3);

  print(7);

 print(11);

print(15);

print(19)

break;

}

Explanation:

Answer Link
rdacoder
rdacoder rdacoder
  • 15-06-2022

Answer:

I will use c++ for this...

#include <iostream>

using namespace std;

int main() {

 int num = 0;

 int curr = 0;

 for (int i = 0; i<5; i++) {

   num = 3 + curr;

   cout << num << " ";

   curr += 4;

 }

}

Answer Link

Otras preguntas

Write 4/5, 1/5, and 3/8 as decimals. Round them to the thousandths place.
What is the Lewis Dot Diagram of gold?
Which is not a compound? 8H2 H2O 6CaO 5HCl
draw to show how you can use models to compare 345 and 391
All of the following weapons used in World War I had not been used in war before EXCEPT: a) the maxim gun b) hand grenades c) poisonous gas d) tanks
at a zoo 3 pandas eat a total of 181.5 pounds of bamboo shoots each day. the male eats 3 times as much as the baby. the female eat twice as much. how many pound
which plural is not formed correctly/ a lamp = lamps b crutch=crutches c eaves = eaves d roof = rooves
Claire takes private lacrosse lessons every 6 days and piano lessons every 4 days. In 60 days, how often will she have lacrosse lessons and piano lessons on the
what is 1/2 + 9/10 + m + n=2?
Describe the daily lives of medieval europeans including their homes, occupations, education, and leisure activites