| | |
simple question
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 2
Reputation:
Solved Threads: 0
hey everyone, im new, and i have a simple question.
im writing this basic code for my class to input six different check amounts, then give the total and average. so far i have it so it works perfect with whole number. the only problem is, the numbers i need to use have decimals, and everytime i try and enter a value like 12.34, the whole things goes crazy. my code is a series of
how can i fix this? thanks in advance
andrew
im writing this basic code for my class to input six different check amounts, then give the total and average. so far i have it so it works perfect with whole number. the only problem is, the numbers i need to use have decimals, and everytime i try and enter a value like 12.34, the whole things goes crazy. my code is a series of
C++ Syntax (Toggle Plain Text)
cout << "Enter the amount of first check: " << endl; int check1; cin >> check1;
how can i fix this? thanks in advance
andrew
![]() |
Similar Threads
- Quick Question: Is J# the same thing as Java? (Java)
- Simple array question (C++)
- This has to be a simple question to answer. (Visual Basic 4 / 5 / 6)
- Ribbon Question (Motherboards, CPUs and RAM)
- Simple question (Windows Servers and IIS)
- Simple Question (Linux Servers and Apache)
- A simple question about CMOS batteries (Motherboards, CPUs and RAM)
- XP Pro (re)activation question (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: Problems with Switch
- Next Thread: char * to TByteDynArray in Borland C++ Builder 6
| Thread Tools | Search this Thread |
api array beginner bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion count database delete desktop developer directshow dll download dynamic email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





