Ahmet Taha

Ahmet Taha

  • 1.7k
  • 363
  • 7.2k

c# in console what code of this

Sep 10 2021 6:48 AM

1. Create a c # console that adds two numbers (integers).
2. The console should ask for two numbers (i.e. Enter first number: and Enter second number:)
3. The console should display "The sum of n1 and n2 is total" - where n1 and n2 are the entered numbers and total is the sum (int) of the two.

4. The script would then ask if the user wants to try again. The user will input Y/y - for yes, and N/n for no.
5. If Y or y was entered then go back to step 2 onwards.
6. However if the user chooses N or n - the console should display 'Thank you!'

Answers (2)