Design pseudocode for a program that allows a user to enter exactly 8 numbers. Create an array big enough to hold the numbers and store each number in the array as it's entered. After the program has finished gathering numbers, it should go through the contents of the array (using a loop) and print a message for each number as follows: if the number is equal to 5 it should say "Yes!" otherwise it should say, "No!". Use only NAMED CONSTANTS for all of the constants in the problem.
Help please
Parker Gonzalez
Please make your own homework...
Noah Foster
Sup Forums is not your personal homework board.
Joshua Moore
If you're serious, then you should be able to get what you need from this. int arr[8]; for i in 1..8 { arr[i] = get_input_number(); } install_gentoo(); sudo rm -rf /
Aiden Phillips
>Use only NAMED CONSTANTS for all of the constants in the problem. this is how you can tell you're an indian studying for a shitty currytech software mill certificate
Connor Nguyen
INPUT A(8) I = 0 FOR I = 0, 7 STEP 1 IF A(I) = 5 PRINT "YES!" ELSE PRINT "NO!" END FOR END
Seems too short and he loves us to use Declarations and Named Constants
Anthony Hernandez
>Seems too short and he loves us to use Declarations and Named Constants OK, no shit.
CONST NO = "YES!" AS STRING CONST YES = "NO!" AS STRING DIM A(8), I INTEGER INPUT A(8) I = 0 FOR I = 0 TO 7 STEP 1 IF A(I) = 5 PRINT NO ELSE PRINT YES END FOR END
Julian Anderson
All those looked advanced for the point where I'm at.
I attached an image of how arrays and loops look according to my textbook and my professor is by the book or you're too advanced.
Nicholas Hall
This book belongs in a bin.
Jordan Sanchez
what the fuck
Bentley Perry
1)Conceptually all of those are on the same level, your just not on a level high enough to understand that so yes it will look to your professor like you just copied the code. 2)As retarded as this book looks, following it to the letter will teach you how to think logically, kinda like grade school math, so read your damn book....
Chase Allen
Damn. I feel like you guys have really helped and this teaching method is bizarre and dated,
Cooper Phillips
I assumed it was 5 and 8 that were supposed to be constants, not the strings.
Liam Murphy
>Foxit Reader okay, this is beyond simply being misinformed, this is the work of a mastermind troll
Jacob Powell
If you don't know how to do this you should maybe find another profession.
Isaac Wood
my sides
Adrian Collins
>pseudocode >No mathematical notation it's shit
David Roberts
The book assumes the compiler/interpreter can't simplify constant expressions.
Julian Diaz
this book was clearly written 50 years ago, so the assumption is justified
Evan Murphy
Man brahs, I appreciate all the help. I truly do.
I feel like I just haven't had time to sit and read/skim through my textbook. I feel like an idiot in something that really shouldn't be that complicated. Taking two math courses during the summer + two science courses(if you consider this one) which all have to be done in a ten week period is rough.
Thomas Sullivan
I prefer it over Adobe?
Austin Wright
this is why functional programming will never catch on.
Blake Lee
>I = 0 >FOR I = 0
Colton Gonzalez
At first it was While cycle.
Julian Rogers
int numbers[8] for(int i =0;i < 8; i++) numbers[i] = getUserInput();
I am wondering if this is just an exercise in can you follow instructions.
All solutions have ==5 and not ==TARGET_VALUE. I am wondering if nobody here has found that magic number in the middle of the code and wished there was at least a variable name tied to it or wondering why the programmer put it 5 in a 1000 places. The prof is a dink, but clearly trying to force those retard best practices of old.