a) PRINT TAB

b) END IF commands.

I shall be very very grateful indeed, if someone would please urgently clear my doubts, by putting in the syntax of both commands separately and using example programs.

P.S. I use QB64 for practice purposes at home.

- Thread starter RUDY03
- Start date
- Tags help me!! programming qbasic

a) PRINT TAB

b) END IF commands.

I shall be very very grateful indeed, if someone would please urgently clear my doubts, by putting in the syntax of both commands separately and using example programs.

P.S. I use QB64 for practice purposes at home.

Hey friends!

My exams are near, and I need serious help in BASIC programming...

Question:

1) WAP in BASIC to input 50 numbers. Display sum of all even numbers among given set of numbers.

2) WAP in BASIC to find the sum of negative odd numbers and product of positive even numbers separately in a set of 100 numbers entered by an user.

3)In a class the teacher wants to calculate average marks of 45 students. WAP to input 45 marks and calculate average marks.

4)Write a program in BASIC to print:

My exams are near, and I need serious help in BASIC programming...

Question:

1) WAP in BASIC to input 50 numbers. Display sum of all even numbers among given set of numbers.

2) WAP in BASIC to find the sum of negative odd numbers and product of positive even numbers separately in a set of 100 numbers entered by an user.

3)In a class the teacher wants to calculate average marks of 45 students. WAP to input 45 marks and calculate average marks.

4)Write a program in BASIC to print:

(a)

INDIA

INDI

IND

ININDI

IND

I

A

I

D

N

I

I

D

N

I

5) WAP to enter sentence in upper-case. Count no. of vowels in the sentence.

That's all for now.......

Now obviously they want us to use FOR-NEXT loops....otherwise it could have been much easier as well as much longer.....

I really don't know how to do calculations based on the results of many loops taken together....

That's all for now.......

Now obviously they want us to use FOR-NEXT loops....otherwise it could have been much easier as well as much longer.....

I really don't know how to do calculations based on the results of many loops taken together....

Last edited:

- Loop until false (on input) read in number from user and store it in an array
- Then have a for next loop 0 to < array size. If number mod 2 is 0 add number to sum

- Loop until false (on input) read in number from user and store it in an array

- If number < 0 add it to sum of negative numbers
- if number mod 2 equals 0 take the product of number

- Loop until false (on input) read in number from user and store it in an array

- Add up numbers and divide by how many numbers you have

- a) Use a for next loop that starts at 5 and step -1 and use the LEFT function to print
- b) A string is an array, so just use a for next loop and print each char using the step variable in the loop

- Use two nested for next loops the first loop steps through each letter in the sentence
- The inner loop loops through an array with vowels and checks the current letter in the sentence for a match

This website is not affiliated, owned, or endorsed by Microsoft Corporation. It is a member of the Microsoft Partner Program.