New to C++ and lost
Name:
Anonymous
2012-09-21 23:36
I have an assignment due, and was sick all week. is anyone bored and able to help me write a code?
it needs to look like this
. chart
. =========
.
. Type Amount Percent Sales
. Type1 ### ##% $ ##.##
. Type2 ### ##% $ ##.##
. Type3 ### ##% $ ##.##
. Total #### 100% $ ###.##
Name:
Anonymous
2012-09-21 23:55
#include <iostream>
int main() {
std::cout << ". chart\n. =========\n.\n. Type Amount Percent Sales\n. Type1 ### ##% $ ##.##\n. Type2 ### ##% $ ##.##\n. Type3 ### ##% $ ##.##\n. Total #### 100% $ ###.##\n";
return 0;
}
You're welcome.
Name:
Anonymous
2012-09-21 23:55
Not gonna do your homework. This shit is baby programming, nigga. You can find this online faster than waiting for a reply.
Name:
Anonymous
2012-09-22 0:01
Lol, well played sir. . . well played.
and to #3, yes, literally only had 5 classes and missed 2 cuz i was sick. ill check around. what sites do you recommend?
Name:
Anonymous
2012-09-22 0:07
Name:
Anonymous
2012-09-22 0:13
Here are some hints:
struct item {
char *type;
int amount;
int percent;
float sales;
};
and:
http://en.wikipedia.org/wiki/Printf_format_string#Format_placeholders
Name:
Anonymous
2012-09-22 2:47
>>1
Write it in COBOL and then tell your professor that using IEEE binary floating point numbers to store monetary values is ``considered harmful''.
Name:
Anonymous
2012-09-22 9:53
Back to StackOverflow, "please."