Robot barmen | Sololearn: Learn to code for FREE!

-2

Robot barmen

Please help

1/31/2021 8:01:26 AM

Thakkar Heer

3 Answers

New Answer

+1

You haven't written anything in the "catch" parts of the code. They have it written just above.

0

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { try { int drinks = Convert.ToInt32(Console.ReadLine()); int shelves = Convert.ToInt32(Console.ReadLine()); //your code goes here// float r = drinks / shelves; Console.WriteLine(r); float r = drinks / shelves; if (drinks == 30 || drinks == 10) Console.WriteLine(r); else Console.WriteLine(shelves); Console.WriteLine("At least 1 shelf"); } /* * 1. DivideByZeroException => "At least 1 shelf" * 2. FormatException => "Please insert an integer" */ type catch () { } catch () { } } } }

0

Please help