Question 1/20 What is the purpose of the following code segment? 1. Olt will print 18 stars on the same row. 2. Olt will print 9 stars on the same row. 3. Olt will print 6 stars on the same row. 4. Olt will print 5 stars on the same row. 5. Olt will print 4 stars on the same row. 6. Olt will print stars infinitly on the same row. int val1 = 2, val2 = 7; int i, j; for (i = 1; i

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
Question 1/20
What is the purpose of the following code segment?
1. Olt will print 18 stars on the same row.
2. Olt will print 9 stars on the same row.
3. Olt will print 6 stars on the same row.
4. Olt will print 5 stars on the same row.
5. Olt will print 4 stars on the same row.
6. Olt will print stars infinitly on the same row.
int vall = 2, val2 = 7;
int i, j;
for (i = 1; i<vall; i++);
{
j = i;
while (j<val2)
}
}
cout<<"* ";
j++;
Transcribed Image Text:Question 1/20 What is the purpose of the following code segment? 1. Olt will print 18 stars on the same row. 2. Olt will print 9 stars on the same row. 3. Olt will print 6 stars on the same row. 4. Olt will print 5 stars on the same row. 5. Olt will print 4 stars on the same row. 6. Olt will print stars infinitly on the same row. int vall = 2, val2 = 7; int i, j; for (i = 1; i<vall; i++); { j = i; while (j<val2) } } cout<<"* "; j++;
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data Binding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,