Question: Q4) Write a program in which ask user to enter direction i.e n for north , s for south , e for east , w

Q4) Write a program in which ask user to enter direction i.e n for north , s for south , e for east , w for west . Also take 2 integer variables A and B and assign values 10 each.

If user enters North A should be incremented by 5

If user enters South A should be decremented by 5

If user enters East B should be incremented by 5

If user enters West B should be decremented by 5

In case of any other value output invalid option

solve question 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!