Given an amount less than $1.00, compute the number of quarters, dimes, nickels, and pennies needed.
so i'd need a variable for quarters, dimes, nickels, & pennies. and another variable..... not...
Type: Posts; User: ferfy
Given an amount less than $1.00, compute the number of quarters, dimes, nickels, and pennies needed.
so i'd need a variable for quarters, dimes, nickels, & pennies. and another variable..... not...
yeah that's what i was gonna do.... but i've been up all night and it's 6am so i can't be bothered to revise it again tonight :/
but thanks again for your help :)
Or i could just remove the exclamation mark :P hehe
my bad..... still was bugged... here's the new fix:
[C++] grade.cpp - Pastebin.com
#include <iostream>
#include <string>
int main()
ah didn't know i could do that :D hahahaha
here's the simplified code:
#include <iostream>
#include <string>
int main()
Final Code:
[C++] grade.cpp - Pastebin.com
Bug free :) now time for a smoke
#include <iostream>
#include <string>
int main()
thanks oogabooga.... final code:
#include <iostream>
#include <string>
int main()
{
i indent 1 level per if or loop...... same as you.. idk what you mean... b/c that's exactly what i'm doing..... ?!?!?!?
modified the code a bit, works better, but still wrong output.... 1-3...
test input: 71, expected output: C-
Actual output: -----
Another example: test input: 50 expected output: F+
actual output: You scored an F
-+-+-+-+
i dont wanna argue about coding style... here's the updated code, it compiles fine, but for some reason the outputs wrong.... WHY DO MY POSTS KEEP NOT SHOWING UP/DELETED? WTF
#include...
Dont wanna argue about style....anywho this is the updated code:
#include <iostream>
#include <string>
int main()
{
I dont wanna argue.... anywho yeah i think it needs to be an integer and i need to use modulus to get the 2nd digit
that's a matter of opinion and style, i dont like ur indenting style, i like mine -_-
also, i guess it's because strings cant be processed as numbers... -_-
although i tried a character array cuz...
This is what i got so far... not sure why it's not compiling.... or if it's right :/
#include <iostream>
#include <string>
int main()
{
By any chance are you reading "Practical C++ Programming"? Cuz that's an exercize in chapter 6...... the chapter i just finished :)
if i worked out the logic on how to do it, i wouldn't be asking silly :P
well i know i need to read the last digit of the variable "grade", and then add + or - to the output, depending, but idk...
yeah that'd work, but how would u implement lastdigit?
i would have to do that for every last digit...... ........ that, isn't there a way to read the last digit, and place a - or + accordingly
no idea what intereval and subinterval are
#include <iostream>
int main()
{
int grade;
std::cout << "Enter your grade %: ";
std::cin >> grade;
x.x :(
ummmm, would really help.... anyone know? I'd like to hop on if there is