- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
//Reading the last name from the file ifstream file; file.open("studentName.txt"); char name[20] ; file>>name; cout<<"The last user was: "<<name<<"\n"; file.close(); //Replace the last student name with the new one in the text file cout<<"What is your name?: "; cin>>name; name[0]=toupper(name[0]); ofstream file2; file2.open("studentName.txt"); file2<<name; file2.close(); When I run the program … |
|
private: GradedActivity *grades[NUM_GRADES]; public: void setLab(GradedActivity *activity) { grades[LAB] = activity; } Totally confused with this one. |
|
It is supposed to generate two numbers based on the user's preference of the highest number to use. What I want it to do is to divide integers that result in integers or perfectly whole numbers. I do not want to have numbers that don't divide out with remainders. So … |
|
How do I change this code so that the user can choose a math operation and determine have that type of operation(either add sub mult or divide) run as much as a user wants it to? Say, if the user wanted 5 addition questions only. And how do I keep … |
|
This is the program that I made // Chapter 5, Programming Challenge 8: Math Tutor #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; int main() { int num1, // The first random number num2, // The second random number choice, // The user's choice of problem studentAnswer, … |
|
Hi guys, my assignment is to create a program that sets up a menu for a user to choose from. The menu should consist of an addition, subtraction, multiplication and division problem. It seems to work well, but the only thing that's not working is the division problem. Whenever I … |