Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program asks user to enter three integers, and the displays a message indicating whether the numbers are in sequential order, in reverse order or
The program asks user to enter three integers, and the displays a message indicating whether the numbers are in sequential order, in reverse order or in neither order. Find the errors and correct the program codes in the if statements and the comparison expressions.
1. static void Main() 2. { 3. int n1, n2, n3; 4. string sn1, sn2, sn3; 5. Write ("Enter first number "); 6. sn1 = ReadLine(); 7. n1 = Convert.Tolnt32(sn1); 8. Write ("Enter second number "); 9. sn2 = ReadLine(); 10. n2 = Convert.Tolnt32(sn2); 11. Write ("Enter third number "); 12. sn3 = ReadLine(); 13. n3 = Convert.Toint32(sn3); 14. 15. 16. 17. 18. 19. 20. 21. 22. } if (n1 n2 || n2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started