Sign in to follow this  
Followers 0
MrObvious

Highschool project please help

2 posts in this topic

#1 ·  Posted

So im having a problem at highschool, we have to complete an assignment - make programs for our exercises. The problem is our professor didnt quite explain how everything works with the For and If statement together.

I have 3 exercises, ill write down the instructions for them and i would appreciate if anyone could help me out.

1st exercise:

Write a program: Program allows you to input 20 numbers, then it shows the sum of numbers that were able to be divided by number 3 (not counting numbers such as 0.9 etc., only full numbers like 3,6,9 etc.)

2nd exercise:

Write a program: Out of X (undenefined number) numbers, write down how many out of there are bigger then number 50

3rd exercise:

Write a program: Write a program, that will calculate the between number a and number b

----------------------------------------------------------------------------------------------------------------------------------

All of those exercises have to use only FOR and IF

 

 

Thanks for the reply anyone that can help :) would mean a lot :)

Share this post


Link to post
Share on other sites



#2 ·  Posted

@MrObvious welcome to the forum. In answer to your question:

  • 1st Exercise - Look at For...To...Step,,,Next in the help file. The example shows you how to iterate through a count of x numbers. Then look at Mod to do your division.
  • 2nd Exercise - Look at Operators in the help file. You can use a For Loop to iterate through the list of numbers and use the Greater Than or Less Than operator to compare them to 50
  • 3rd Exercise - Look at Operators in the help file for this as well. The examples show how simple Math calculations can be with AutoIt.

Good luck on your project. Try these out for yourself, and ask questions if you get stuck.

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0