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

Who's your favorite You_Tuber ?​
Click True if the underlined indirect speech is correct; otherwise, click False.Aysha said that she had finished her assignment. -------------------------------
Suffrage is the right to __________.
wang wants to purchase a new computer from best buy. after he purchases the computer, the local best buy store notifies the buyer at corporate headquarters thro
After Arianna completed some work, she figured she still had 78.09 pictures to paint. If she completed another 34.23 pictures, how many pictures does Arianna st
How many ink cartridges can you buy with 225 dollars if one cartridge costs 15 dollars ?
how many pages is 1500 words double spaced 12pt font?
What is a presidential primary?​
religion of ancient Egypt​
A circle labeled Role of doctors points to two other circles. One circle is labeled Identifying incurable diseases. The other circle is labeled Treating curable