Travis Bergkoetter

Greenhorn
+ Follow
since Oct 12, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Travis Bergkoetter

Hi guys, this is my first post here and I'm working on an assignment. I've gotten pretty far but have gotten stumped and need some help.

For this assignment you will want to create 2 files called "RunMyMethods" and “MyMethods” The first file “RunMyMethods” will contain the main that calls a menu method and will have a loop structure that will allow a user to choose what program they want to run. The menu displayed will look like this:

1) Product no negatives

2) Find Twelve

3) Max Min Avg

4) Letter Grade

5) Custom Method ( you design and name)

6) Exit

The second file “MyMethods” will have methods in it that correspond to the menu shown above.  The methods should do the following:

1.

Write a program that will find the product of a collection of data values. The program should ignore all negative values, not convert negative values to positive. For Example if I enter in 2 -3 4 the answer would be 8 not positive 24.

2.

Write a program to read in a collection of integer values, and find and print the index of the first occurrence and last occurence of the number 12. The program should print an index value of 0 if the number 12 is not found. The index is the sequence number of the data item 12. For example if the eighth data item is the only 12, then the index value 8 should be printed for the first and last occurrence.

3.

Write a program to find the minimum, maximum, and average values of a collection of data values. The number of data values is unspecified.

4.

Write a program to read in a collection of exam scores ranging in value from 0 to 100. The program should count and print the number of A's (90 to 100), B's (70 to 89), C's (50 to 69), D's (35 to 49) and F's (0 to 34). The program should also print each score and its letter grade. The following is an example of test data you could enter, but feel free to enter any data you like:
63 75 72 72 78 67 80 63 0 90 89 43 59 99 82 12 100 75







MyMethods


   





RunMyMethods





1 week ago