well thanks for the help. i'm pretty sure i understand it now. i'm assuming things might get a little complicated with all the numbers changing so i'll just have to keep track of everything on paper....
Type: Posts; User: jpatrick
well thanks for the help. i'm pretty sure i understand it now. i'm assuming things might get a little complicated with all the numbers changing so i'll just have to keep track of everything on paper....
i see. so then the next value would be a=1, 1-1=0, and 8 is at the 0 value but it has been replaced by 4? so the second value is 4? is that how it works?
for more clarification.. here's another example that i can't figure out with the same logic because it is a different type of problem..
int main() {
int a[] = {8, 1, 6, 3, 5, 7,...
i know bigH. i was rushing :) sorry lol. but rest assured i fixed it in codeblocks.. i copied and pasted this from a powerpoint.
i do understand better now; I mean, i see how you got the output, at least. i guess i was confusing myself after looking at i=0 so my thought process was something like this: since i=0 then 0+0+1=0...
Hey everyone..
So i'm adding arrays to the already long-enough list of C concepts that i don't understand. I looked at the tutorial on this site and i've googled for info on arrays; nothing i have...
fair enough. thanks for the help
no, that makes sense.. i'll just throw all the code down. The assignment is to have the program assign a random cost of $5-$20 for used games and $25-50 for new games.
int main() {
int...
Hey everyone.
Writing some code and i'm having a little problem with my for loop. the program is only supposed to output 3 lines of code (all different random prices). However, the first price is...
i figured it out. it was really simple i was just being neglectful and not really paying super close attention.
i really appreciate your help and patience holding my hand, Flame of the West.
the variable i was using for up to 40 hours of regular pay previously was weekly_pay. but weekly_pay = weekly_pay +overtime pay doesn't make any sense. While i understand that it doesn't make any...
This is where i'm at now.
int main() {
int num_hours_worked, employee_type, overtime_hours_worked;
float weekly_pay, overtime_pay, pay_rate;
printf("Are you and hourly employee...
right. it stops working after 75 because 40 goes into 80+ at least twice so the remainder resets.
for some reason, i didn't think to use subtraction...
i was initially thinking that using the mod would take, for example, 46 and divide it by 40, which would go into once and have a remainder of...
i'm an idiot.. think i got it now
yes i now have
printf("You will get paid $%f this week.\n", weekly_pay); only once below the entire if/else statement. I now realize my boneheaded mistake of having pay_rate as an integer instead...
i put all of this
printf("Are you and hourly employee (1) or a manager (0)?\n");
scanf("%d", &employee_type);
printf("How many hours did you work this week?\n");
scanf("%d",...
Hey this is a different bit of code. but i'm having some issues with the math.
int main() {
int num_hours_worked, pay_rate, employee_type, overtime_hours_worked;
float weekly_pay_1,...
figured it out. thanks a ton
quick question. When i compile and run the program with codeblocks, it will stay open until i close it, but if i run the .exe file by itself and type in the answer to the prompt, the program closes...
I actually had it right but i had an extra curly brace that i didn't notice in there and i didn't notice so i just assumed i was doing it wrong =\
what are the correct places to put the braces?
hey everyone,
writing a little program and i'm getting an error that says 'else without a previous if'.
char ans_one, ans_two, ans_three, months_experience;
printf("Have you...
thank you kindly.. i'll get to work on that today
what do those changes do exactly?
and what does that (a graphics/video library) entail?