What is dis in the far end of the code ? I tested the code on the compiler of this app and it worked , Thanks in advance. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is dis in the far end of the code ? I tested the code on the compiler of this app and it worked , Thanks in advance.

using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(String[] args) { int totalPrice = Convert.ToInt32(Console.ReadLine()); //call the method Discount(totalPrice); } //complete the method declaration static void Discount(int totalPrice) // !! here it was originally static int Discount() !! it must be static Void { //complete the method body if (totalPrice >= 10000) { double dis = totalPrice - (0.2 * totalPrice); totalPrice = Convert.ToInt32(dis); Console.WriteLine(totalPrice); } else { Console.WriteLine(totalPrice); } } } }

30th May 2022, 4:42 PM
Mustafa Azzoz
Mustafa Azzoz - avatar
2 Answers
+ 1
Looks like its short for discount.
30th May 2022, 9:10 PM
Chris Coder
Chris Coder - avatar
0
I think there is no other option as well Chris Coder But How it worked on the compiler ? 😂
30th May 2022, 9:19 PM
Mustafa Azzoz
Mustafa Azzoz - avatar