So basically I want to create a calculator (with + only).
I'm a beginner in programming and haven't worked so much with C# yet.
Here is the code.. (in Notepad++)
using System ; namespace Add { class Add { static void Main (string[] args) { int summand1 ; int summand2 ; int summe ; summe = summand1 + summand2 ; Console.WriteLine ("summand1: ") ; summand1 = Convert.ToInt32 (Console.ReadLine () ) ; Console.WriteLine ("summand2 ") ; summand2 = Convert.ToInt32 (Console.ReadLine () ) ; Console.WriteLine (summe) ; } } }
What is wrong with it?
cmd.exe doesn't show me what I want.
It should normally show me
Summand1: *here I type the first integer*
Then Summand2: *here I type the second integer*
then == and after the result.
We actually made that in school but I can't properly remember how it worked..
Any help is much appreciated.
Summand = addend
Summe = sum