Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- enum ocene { nezadostno=1, zadostno=2, dobro=3, pravdobro=4, odlicno=5, nps=0}
- static void Main(string[] args)
- {
- Console.WriteLine("Vnesite največje možno število točk:");
- int max = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Vnesite število doseženih točk:");
- int tocke = Convert.ToInt32(Console.ReadLine());
- double procenti = (tocke/max)*100;
- if (procenti < 1)
- {
- Console.WriteLine((ocene)0 + "(0)");
- }
- else if (procenti < 50)
- {
- Console.WriteLine((ocene)1 + "(1)");
- }
- else if (procenti < 60)
- {
- Console.WriteLine((ocene)2 + "(2)");
- }
- else if (procenti < 75)
- {
- Console.WriteLine((ocene)3 + "(3)");
- }
- else if (procenti < 90)
- {
- Console.WriteLine((ocene)4 + "(4)");
- }
- else
- {
- Console.WriteLine((ocene)5 + "(5)");
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement