Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!

olu idowu

Ranch Hand
+ Follow
since May 27, 2020
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by olu idowu

fred rosenberger wrote:

also...are you sure you want to have the same scanf("%d", $num1); line?  won't the second line clobber the value input in the first line?



I changed it
1 week ago
1. Ask the user to enter a positive integer number (call it num1).
2. The program will add all ODD numbers in the range from 0 to num1.
3. Make another FOR loop (outside the first loop) to print all numbers in the same range that are divisible by another number entered by the user (call it num2).

Can someone help me on question 3 (from above this line). I got question 1 and 2 done, help me on question 3

1 week ago
Ask the user to enter unlimited amount of numbers but will terminate when the sentinel (flag) value -1 is entered (use WHILE statement).
Your program will print two outputs: maximum number and average number
The maximum number can be calculated within the main function, whereas the average value must be calculated using a separate function callable by the main function and located within the same source file (only once source file needed). Note: the average function must have one argument only named num to pass numbers from the main function.

check your code using the following entries: 2.5, 33.1, 20, -1. If the code is correct you should get the results: maximum=20, average=18.533. when I test the code, i enter the numbers and it print "enter the numbers:" non-stop. can someone help me?


2 weeks ago
The maximum number can be calculated within the main function, whereas the average value must be calculated using a separate function callable by the main function and located within the same source file (only once source file needed). Note: the average function must have one argument only named num to pass numbers from the main function.

check your code using the following entries: 2.5, 33.1, 20, -1. If the code is correct you should get the results: maximum=20, average=18.533
I checked my code and it it still giving me a different answer: maximum = 2 and average = 2. My prof wants the average to be in a while loop and the line is a wrong statement and wants it to be changed to how a beginner should write. can someone help me please? I have been stuck on this assignment for so long.

this is my newly update code:

2 weeks ago

Mike Simmons wrote:Well, what does the error say?



I can't see the reason, it's not show me the reason
2 weeks ago
I changed my code to this but when I enter the numbers: 2.5, 33.1, 20, -1, It should show 20 but it is showing 2 and the line "int max=INT_MIN;" is giving me error.
2 weeks ago
Ask the user to enter unlimited amount of numbers but will terminate when the sentinel (flag) value -1 is entered (use WHILE statement).
Your program will print one outputs: maximum number

Can someone help whenever I enter -1, nothing happens.

2 weeks ago
hello, I'm doing personal income tax in c programming and when I test my code out, it is show a different output.

My teacher said on the assignment page, use this table to test the code out:


When I enter filing status=0 and taxable income=30000, it gives me 4500 not 8100. I tested to everything from the table that my teacher gave me and it is still giving me 4500 not a different answer

This is my code:

1 month ago
when i run this this program, the four curly brackets at the end of this code gives me error: "Reached End of File While Parsing"

3 months ago
how do restart the program after an incorrect input in a try catch
4 months ago

olu idowu wrote:PLEASE HELP!
How do i do this part at the end of the main method:
This is an example:


I have changed the code and this code works:
Main Method



PayRoll Method




Nevermind I got it
4 months ago
PLEASE HELP!
How do i do this part at the end of the main method:
This is an example:


I have changed the code and this code works:
Main Method



PayRoll Method



4 months ago

fred rosenberger wrote:well, then fix that error.

In all seriousness, we cannot help you if you don't show us the code that is giving the error.  Also, tell us what EXACTLY the error says.  You should try and make is as easy as possible for people to help you if you want help.  




why I post my question if i don't know how to fix my code?
4 months ago

Carey Brown wrote:The obvious answer is to put it outside of the  for() loop, either before or after. If that is not possible then you'd need an if() that would be true at one point in the loop iterations.



It gives me error if i put it outside the loop
4 months ago
How do I print something only once in a for loop?


 

I want to put the code above in the this code below and i want the above code to print once at the end of bottom of the code (inside the for loop).

4 months ago