Back to General discussions forum
I tried solving the summing up problem, yet dispite getting the right answer, the expected answer tells me I'm wrong. The program is as follows:
int a= input("Enter first number";)>
int b = input("Enter second number";)
int sum = a + b
print(a<:)
print(b>:)
Public static void main (string <[- a > + b < ] args) {
print (sum>:) }
Without all the "Show off pseudo-Python Java Nonsense": ";>;<:>:<[->+<]>:" (Without the quotes)
Sample answer: 13 28 41 Expected answer: Code does not return 41 as output ????!
Hi! Thanks for your question!
You see, the problem statement expects a single value as an answer from you. But your program outputs three times. I'm afraid you want too much from the checker - it could not guess that the answer in your case should be the third value of thre... :)
The output still fails if I only output the sum....?
I looked at your last submitted code (via link at your profile page) and it does not look like output only the sum... It still have 3 output operators.
When this code is submitted it is run on the server side and it still yields not the result you wanted.
I later changed the code to only out put the sum, but that failed too :/
Cell 0 contains wrong value ...
Hi,
As well printing the sum of A+B, when your code ends it needs to have A in cell 0, B in cell 1 and A+B in cell 2.
Your code is changing cell 0, so you are getting the message "Cell 0 contains wrong value"
hmmm.... So I need A in 0, B in 1, without outputting them, and a+b the only one being out putted, am I right?
Yes, read the 1st number into cell 0, read the 2nd number into cell 1, calculate the sum of the two numbers into cell 2 (without changing cells 0 & 1) then output the sum.
oof, no wonder it's just a late problem. Pretty hard; guess I'll try later.