I tried using michael's idea but it said <sstream> not found
Type: Posts; User: UWP student
I tried using michael's idea but it said <sstream> not found
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int score; // input variable
int section = 0;
• ctrl-d will trigger an end of file on standard input
can someone tell me what this means please? Does it mean instead of hitting enter, you hit ctrl-d to make the cout statements appear?
So start my loop with
while (section > 0 )
We have to then have a cout that says how many sections there are total but I was trying to first get the program to read one score then I can add a...
This is how far I have gotten so far, I do not know if I am on the right track or not so if anyone knows any hints or ideas for me that would be awesome. Thanks for reading
#include <iostream>...
Here is an example since I am bad at explaining things. Again I do NOT want you to do it, I just need help starting it.
Sample input 1
2 80 97
5 69 79 89 99 58
7 60 70 80 90 100 0 59
Sample...
So for my problem they give us scores for a section. And there are a number of sections that they could give us in the class. I have to tell how many A's, B's, C's, D's and F's are received in the...
I also cannot use tolower. We cannot use functions loops or arrays
this is what the program is suppose to do
Good
Enter the first operand (zero, one or two):
one
Enter an arithmetic operator (plus, minus, times, divide):
plus
Enter the second operand (zero,...
it says no such namespace std::tolower
well it looks like I ran into another problem I didnt even know about. If the person typing in the numbers types in Two instead of two, it is suppose to say error..Is there a way to make it so if the...
#include <iostream>
#include <string>
using namespace std;
int main()
{
string operation, firstnumber, secondnumber;
float value;
int number1, number2;
my problem is I do not know how to assign things
yes laserlight, my only question really is how do I assign a string to an int? This is my first program I have ever done so I am sorry I am just confused. Is my program good so far? Is all I have to...
laserlight that is what I have been trying to do but for some reason I cannot figure out how to do it. I want firstnumber = number1 and secondnumber = number2, so then all of my equations will work...
you mean you are not allowed to just do -if first number equals zero then let number1 be 0 ?
I am confused on what you mean by "let". How would I put that in a C++ function?
that works laserlight, but then do I have to do that for every possible equation.
0+1
0+2
0*1.....and so on?
no because it says "cannot assign values of type const char(2) to a variable type int
the only way I can get all the equations to work is if I change firstnumber and secondnumber to number1 and number2 but then the inputs will not be strings, and that is part of the problem that I...
Hey so this is my first ever post so I hope I am doing it right. I have been working on this homework assignment for over a week and I am so close to being done but I cannot figure out the rest. So...