Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# program applies bonus points

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
 
class BonusNumber
{
    static void Main()
    {
        Console.WriteLine("Please write a number between 1 and 9: ");
        int a = int.Parse(Console.ReadLine());
 
        switch (a)
        {
            case 1:
            case 2:
            case 3:
                Console.WriteLine("The BONUS score is: " + (a * 10));
                break;
            case 4:
            case 5:
            case 6:
                Console.WriteLine("The BONUS score is: " + (a * 100));
                break;
            case 7:
            case 8:
            case 9:
                Console.WriteLine("The BONUS score is: " + (a*1000));
                break;
            default:
                Console.WriteLine("Invalid Score!");
                break;
 
        }
    }
}
Comment

C# program applies bonus points

using System;
 
class BonusScore
{
    static void Main()
    {
        Console.WriteLine("Please enter integer between 1 and 9: ");
        int a = int.Parse(Console.ReadLine());
 
        if (a == 1 || a == 2 || a == 3)
        {
            Console.WriteLine("The BONUS score is: {0}", (a * 10));
        }
        else if (a == 4 || a == 5 || a == 6)
        {
            Console.WriteLine("The BONUS score is: {0}", (a * 100));
        }
        else if (a == 7 || a == 8 || a == 9)
        {
            Console.WriteLine("The BONUS score is: {0}", (a * 1000));
        }
        else
        {
            Console.WriteLine("Invalid score!");
        }
    }
}
Comment

C# program applies bonus points

using System;
 
class BonusNumber
{
    static void Main()
    {
        Console.WriteLine("Please write a number between 1 and 9: ");
        int a = int.Parse(Console.ReadLine());
 
        switch (a)
        {
            case 1:
            case 2:
            case 3:
                Console.WriteLine("The BONUS score is: " + (a * 10));
                break;
            case 4:
            case 5:
            case 6:
                Console.WriteLine("The BONUS score is: " + (a * 100));
                break;
            case 7:
            case 8:
            case 9:
                Console.WriteLine("The BONUS score is: " + (a*1000));
                break;
            default:
                Console.WriteLine("Invalid Score!");
                break;
 
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: C#$ 
Csharp :: create file gz c# 
Csharp :: excute same code mvc 
Csharp :: Transparent UserControl 
Csharp :: C# how to stop user type into combobox 
Csharp :: c# result set from stored procedure 
Csharp :: Xamarin Forms Update Button Text Code 
Csharp :: download file c# 
Csharp :: BOTON PARA CAMBIAR DE VIEW ASP.NET 
Csharp :: grass download for unityh 
Csharp :: .net form binding why cant i skip index 
Csharp :: c# xaml textblock new line 
Csharp :: ow-to-return-http-500-from-asp-net-core-rc2-web-api 
Csharp :: static {} 
Csharp :: android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:1145) 
Csharp :: how to textbox anywhere on chart in c# 
Csharp :: c# Search specified string inside textbox 
Csharp :: convert string to boolean c# 
Csharp :: selenium webdriver what browser am i using? 
Csharp :: c# mapper.map 
Csharp :: Insertion sort in c# 
Csharp :: c# second last element 
Csharp :: c# arraylist to listview 
Csharp :: 0.8 dikali 0.8 
Csharp :: call action method on checkbox click asp.net mvc without pageload 
Html :: how to use unsplash images in html 
Html :: whitespace in html 
Html :: centralize div bootstrap 
Html :: whatsapp html code for website 
Html :: mirror html video element 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =