How to write simple program?

Ceh9_N

New member
Joined
Oct 14, 2022
Messages
1
Programming Experience
Beginner
The user enters integers from the keyboard (numbers are entered alternately,
the user enters a number and presses "Enter"). The sequence of numbers ends
by entering the value "0". Count the number of even and odd numbers,
number of positive and negative.
Requirements
1. set Unicode encoding for the console;
2. in case of errors in entering values (for example, instead of
number, the user will enter letters, or a fractional number), display an error message and
ask the user to enter the same value again;
3. Display the result of the program on the screen
 
We are not a code writing service. Post your code in code tags. Tell us what problems you are encountering. Tell us what you have tried to resolve those issues. We'll try to guide you as best we can.
 
Copying your homework assignment here and expecting us to do it for you is not acceptable. We are willing to help with homework but only when you show that you have made an effort on your own behalf and can explain a specific issue you have encountered. We will then help you solve the problem for yourself, not cheat for you.
 
As an aside, requirement #1 from above will be difficult to implement using purely C# and the .NET framework in a cross-platform way. The output encoding cannot be set to Unicode on Android, iOS, or tvOS. I'm not sure how you would go about setting the input encoding in a non-platform specific way.
 
Back
Top Bottom