1. Course
  2. Flow controls B
  3. Digits in a number

Digits in a number

Last updated: 8/22/2020 Difficulty: Easy

Create a program in C# to calculate how many digits has a positive integer.

If the user enters a negative integer, the program must show a warning message, and proceed with the equivalent positive number.




2 digits
(Warning: it is a negative number)
4 digits


Flow controls B

8 / 8

Android App

Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty

Learn C# at your own pace, the exercises are ordered by difficulty.