+ 1

Why My Code of Gapful No. is Showing "No Output"?

Pls help debugging my Code...😢 https://code.sololearn.com/cMz8aaSpvTN1/?ref=app

11th Nov 2018, 3:59 PM
Priyesh Arya
Priyesh Arya - avatar
5 Réponses
+ 2
Many errors 1. To find out no.of digits, input(n) is divided by 10, then the same input is used in further calculation which will cause calculation error. Copy input to some other temporary variable which can be used in further calculation later on 2. Use of conio. Conio.h is not supported by sololearn compilers. Remove all traces of conio 3. Check out the if and else part, there'e is some problem
11th Nov 2018, 4:57 PM
‎ ‏‏‎Anonymous Guy
+ 2
Priyesh Arya your still getting division by zero. Inside the while loop you are changing the value of n. After the while loop n = 0;
12th Nov 2018, 2:36 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
You are getting division by zero in line 20!
11th Nov 2018, 5:05 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
Yup Got It.... Now Its working .... Thank U Buddy...😉😘
12th Nov 2018, 2:52 PM
Priyesh Arya
Priyesh Arya - avatar
0
Yup, Fixed it as Mentioned by You Guys.... (*Fixed Line 20 issue * Fixed conio.h issue * Fixed same Variable issue ) And Added an Example also to understand the Logic of my Code... 😅 Still It shows No Output.... Check It Again Pls...!!😢
12th Nov 2018, 2:31 PM
Priyesh Arya
Priyesh Arya - avatar