That works. Thanks
My instructor insisted that only one "%" was needed to make the symbol appear. Obviously two is the trick.
Type: Posts; User: khskenny
That works. Thanks
My instructor insisted that only one "%" was needed to make the symbol appear. Obviously two is the trick.
I've tried a few different ways to display these computed fields as percentages with no luck. Any tricks?
Seems to work. I just had to sit and stare at it for a while. Just need to tweak a bit to get %
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define SIZE 13
int rollDice(void);
Actual is going to be the frequency of each sum / 36000
Expected is as stated above. The statistical chance of each pair of dice.
That is where I am having some trouble ;)
Basically, 36000 rolls of the dice. I want to output the sum of the two dice (done) the frequency of each sum (done) and the expected along with actual. Both of the later should be in percentage. I...
Thanks for the help guys. Bummer it was a careless error this time, but it got fixed. This forum ftw!
When I ran it sans extra semi colon, it did what I wanted, just not formated in an appealing or logical pattern, which I will fix. It does seem to do the interest sets as it should...
HAH!
Hrmm, since I am not using any floats for year or rate, it should be ok right?
Also, is principal not initialized at the top @ 1000?
Have an issue with some for statements.
I must be missing somew logic here. I'm trying to get this compound interest program going. I can get it to go through 10 years on one interest rate, but...
Thanks swoopy that's exactly what I was looking for. So simple, don't know why I missed it.
Could I just use all floats and keep things the way I have it?
Well, I think it works like the question in my book states! Thanks for the help.
However, I thought my teacher mentioned using:
while(hrs != -1)
I may not have mentioned that it needs to loop as many times as you want it to before putting in -1. If that is the case, do I still get rid of the while statement and just throw it in the if part?
Hah, I just saw that too. I'll fix it ;) I was just throwing stuff together to get the overall thing to work and did not pay much attention to detail.
Yeah, you can work for me. If you put in over...
Thanks for the advice, but I must use scanf for keyboard input due to class restrictions ATM. I will update the code above and put in %f in place of the %d
Right now the program half ass works....
I've been getting some strange problems with my code so far. You need to input hrs as an integer, rate as a float, and then compute salary as a float. If >40 hrs are eneterd it is time and a half....