User Profile
Collapse
-
Actually not that simple. -
-
Need help with functions and end of file loop in c++
The code that i came up with is not working -
They are converted using a combination of the two functions. But I changed it a little how do i add all the numbers together before they are displayed?
Code:int Roman_digit_Value( char roman_digit ) { int val; if ( roman_digit == 'I' ) val = I; else if ( roman_digit == 'V' ) val = V; else if ( roman_digit == 'X' ) val = X; else if ( roman_digit
Leave a comment:
-
Roman Numeral calculator Functions help in c++
I need someone to look over these because I'm not sure how to make it write the correct output. I know its kind of a lot of code to look at but any help would be much apprecitated. I think the problem is between lines 129-131. -
Yes, I am using only the additive form. Heres some more info.
I = 1
V = 5
X = 10
L = 50
C = 100
D = 500
M = 1000
bad_val = -1
What is confusing me is how to use the basic functions i made to read each letter, change it to a number, add all the numbers together, and then display that number. It also has to do some eqautions but i think i can figure that part out after this...Leave a comment:
-
This whole program really seems to be confusing me. Yes,
I, V, X, L, C, D, M are const integers. And by if else cascade means: (we cant use switch)
Code:int Roman_digit_Value( char roman_digit ) { int val; if ( roman_digit == 'I' ) val = I; else if ( roman_digit == 'V' ) val = V; else if ( roman_digit == 'X' ) val = X; else if ( roman_digit
Leave a comment:
-
-
-
Actually im using C++, but heres the whole code because i think the problem is the first if statement is set to 0at the end and thats why it outputs that seventh one:Leave a comment:
-
Parse error on line 55: break statements are only allowed within switch statements;
breaking out of a loop is not supported.
I added that and it gave me this error.Leave a comment:
-
that would work but there could be more or less than 7 in the file.Leave a comment:
-
How to stop a loop before it gets to the last one
This loop goes through all the lines in the file but there are only six lines and it has seven outputs -
Not getting right output for this while loop
My code compiles and gives the righ output for the first output -
-
How to calculate highest and lowest score using a while loop
the in input file is like
2 80 97
5 69 79 89 99 58
7 60 70 80 90 100 0 59
[
No activity results to display
Show More
Leave a comment: