thank you
Type: Posts; User: atlas07
thank you
i guess, it's because i'm using borland 5.02 which is out of date, but hey thats what we HAVE to use for this program
ok, i have reformatted my code and sorted out my issue. For all those who were unhappy.
I now have a new problem, how would i output the commission value in case 4? (line 107).
here i have tried...
my fault, i thought you were talking about another piece of code
if the input was 'y', it wouldn't go to the next bit of code. it would just loop back to the menu. so that wouldnt work.
if 'n' was inputted, it would say illegal character.
ok. i had tried
cout << "\n20% commission of total sales is " << total_sales * 0.20 = commission << "\n\n\n";
before and it never worked. i guess i had to do it the way you suggested....
i was hoping you could first run my program and have a look. It is extremely basic. i didnt know how to output the commission values in from case 3 (line 87 to 91) and output them in case 4, and i...
this is just SOME of my code. The entire code would be too large to print. it runs ok, i just need someone to look at case 3 and 4 in the switch statement.
Can someone please explain to me why i...
i have a piece of an unfinished program.
try to run it...
if you go straight to option 3 and input values, how do i output these values in option 4 ?
i tried outputting my declared variables
it...
i tried tjis and it works better. Thanks
#include <conio.h>
#include <iostream>
int main()
{
double sales, sales_amount, quantity, total_sales, vat;
please run this simple program......
why wont this work ?
i tried it first with if...else
/*why will this program not run? what did i do wrong with the if else statements/conditions ?*/
Info :Compiling E:\program\noname00.cpp
Error: noname00.cpp(1,2):Unable to open include file 'SSTREAM.h' ??????????????
Warn : STRING.h(549,3):Functions containing for are not expanded inline...
the thing is, my compiler does not recognize the language.
Unfortunately, we HAVE to use borland c++ 5.02 !
Any idea how to stop the program from crashing when a non character is inputted ? - in...
nope, does not work.
a number cannot be smaller than 1 AND bigger than 10
i got it to loop and put it in my program, (right at the end. last 7 lines)...
but, i have a problem. When a non integer is inputted, the program crashes.
how do i get around this ?
#include...
i am writing a program whereby i have written the instructions the shell of the program, and have written code for inputting values, but how do i collect all the information i have inputted. I am...
you mean,
#include <iostream.h>
#include <string>
#include <conio.h>
main()
{
string date;
i'm sure an if statement wouldnt loop though
#include <iostream.h>
#include <string>
#include <conio.h>
main()
{
string date;
char answer; //either yes or no
bool check;
how would you go about writing what i am trying to do ?
#include <iostream.h>
#include <string>
#include <conio.h>
main()
{
string date;
char answer; //either yes or no
bool check;
I have a c++ problem regarding looping. I am writing a program which will include a problem similar to below.
1) ok, i am writing a program that asks the user to enter a number.
2) Then ask...
Don't talk too much, because your ignorance is greater than your knowledge.
I am in the middle of a program.
It is unfinished.
However i would like to validate the date.
I am stuck.
Please could you take 5 mins to look at this.
Here is the original program into which...
I have been teaching myself c++ from scratch for the past 4 weeks, as my teachers are crappy. I have an assignment due for early May....
I need help with writing a program that will enter and...