0% found this document useful (0 votes)
15 views1 page

Using For Loop, Solve The Following Problems

The document provides instructions for 3 For Loop exercises: 1) Add up numbers between a start and end position entered by the user and display the answer, 2) Iterate from 0 to 20 reporting if each number is even or odd in a Listbox, 3) Print a triangular pattern from 1 to 7 stars in a Listbox. Students are asked to write the code for each exercise, print it on short bond paper, and submit it by August 2nd as a reminder of their class schedule.

Uploaded by

Yani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Using For Loop, Solve The Following Problems

The document provides instructions for 3 For Loop exercises: 1) Add up numbers between a start and end position entered by the user and display the answer, 2) Iterate from 0 to 20 reporting if each number is even or odd in a Listbox, 3) Print a triangular pattern from 1 to 7 stars in a Listbox. Students are asked to write the code for each exercise, print it on short bond paper, and submit it by August 2nd as a reminder of their class schedule.

Uploaded by

Yani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Using for loop, solve the following problems.

1. Put two textboxes on your form. The first box asks users to enter a start position for a
For Loop; the second textbox asks user to enter an end position for the For loop.
When a button is clicked, the program will add up the numbers between the start
position and the end position. Display the answer in a message box
2. Write a for loop that will iterate from 0 to 20. For each iteration, it will check if the
current number is even or odd, and report that to the screen.
1 is odd
2 is even
3 is odd
.
.
.
20 is even
* Note that the output should be displayed in Listbox.
3. Write VB.NET code to print the following pattern:
1******
12*****
123****
1234***
12345**
123456*
1234567
* Note that the output should be displayed in Listbox.

Each exercise should be printed out in a short bond paper and it will submitted tomorrow,
August 2, 2016. This is prize of forgetting your class schedule.

You might also like