Advertisement
Guest User

dsadawdasdawdasdawdas

a guest
Oct 24th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         enum ocene { nezadostno=1, zadostno=2, dobro=3, pravdobro=4, odlicno=5, nps=0}
  12.         static void Main(string[] args)
  13.         {
  14.             Console.WriteLine("Vnesite največje možno število točk:");
  15.             int max = Convert.ToInt32(Console.ReadLine());
  16.             Console.WriteLine("Vnesite število doseženih točk:");
  17.             int tocke = Convert.ToInt32(Console.ReadLine());
  18.  
  19.             double procenti = (tocke/max)*100;
  20.             if (procenti < 1)
  21.             {
  22.                 Console.WriteLine((ocene)0 + "(0)");
  23.             }
  24.             else if (procenti < 50)
  25.             {
  26.                 Console.WriteLine((ocene)1 + "(1)");
  27.             }
  28.             else if (procenti < 60)
  29.             {
  30.                 Console.WriteLine((ocene)2 + "(2)");
  31.             }
  32.             else if (procenti < 75)
  33.             {
  34.                 Console.WriteLine((ocene)3 + "(3)");
  35.             }
  36.             else if (procenti < 90)
  37.             {
  38.                 Console.WriteLine((ocene)4 + "(4)");
  39.             }
  40.             else
  41.             {
  42.                 Console.WriteLine((ocene)5 + "(5)");
  43.             }
  44.             Console.ReadLine();
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement