No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I stumbled on this function that calculates #'s that are perfect, how ever I do not understand why it works. any one care to explain? [code] int perfect(int num,int den) { int rem = num - ((num/den)*den); if (rem==0) return(den); else return(0); } [/code] |
|
Hey, while doing an assignment I came across a code. however, when I run it I get no output. would like to know why if anyone knows..... [code] #include <stdlib.h> #include <stdio.h> int main(int ac, char** av) { unsigned register int j,sum,dcnt, limit; unsigned int number,max; if (ac != 2) … |
|
Greetings...I'm trying to add a part for 2 times the rate for any hours over the first 60...Can anyone aid me? Many thanks [code] // This program calculates gross pay. #include <iostream> #include <iomanip> // Global constants const double PAY_RATE = 10; // Hourly pay rate const double BASE_HOURS = … |