Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Zadata(zadaca)
- using System;
- class Program
- {
- public static void CWL(string text)
- {
- Console.WriteLine(text);
- }
- public static void CRL()
- {
- Console.ReadLine();
- }
- public static void Temperatura()
- {
- Console.WriteLine("\nTemperatura: ");
- }
- static void Main()
- {
- int temp, temp1, temp2;
- char pad, pad1, pad2;
- CWL("Unesite prognozu za Sarajevo: ");
- Temperatura();
- temp = Convert.ToInt32(Console.ReadLine());
- do
- {
- CWL("Padavine (D ili N): ");
- pad = Convert.ToChar(Console.ReadLine());
- if (pad != 'D' && pad != 'd' && pad != 'N' && pad != 'n')
- {
- CWL("Pogresan unos!\n");
- }
- } while (pad != 'D' && pad != 'd' && pad != 'N' && pad != 'n');
- CWL("Unesite prognozu za Mostar: ");
- Temperatura();
- temp1 = Convert.ToInt32(Console.ReadLine());
- do
- {
- CWL("Padavine (D ili N): ");
- pad1 = Convert.ToChar(Console.ReadLine());
- if (pad1 != 'D' && pad1 != 'd' && pad1 != 'N' && pad1 != 'n')
- {
- CWL("Progresan unos!\n");
- }
- } while (pad1 != 'D' && pad != 'd' && pad != 'N' && pad != 'n');
- CWL("Unesite prognozu za Bihac: ");
- Temperatura();
- temp2 = Convert.ToInt32(Console.ReadLine());
- do
- {
- CWL("Padavine (D ili N): ");
- pad2 = Convert.ToChar(Console.ReadLine());
- if (pad2 != 'D' && pad2 != 'd' && pad2 != 'N' && pad2 != 'n')
- {
- CWL("Pogresan unos!\n");
- }
- } while (pad2 != 'D' && pad2 != 'd' && pad2 != 'N' && pad2 != 'n');
- if (((temp > 20 && temp < 30) || (temp > -5 && temp < 0)) && (pad == 'N' && pad == 'n'))
- {
- CWL("Drugarice idu u Sarajevo!");
- }
- else if (((temp1 > 20 && temp1 < 30) || (temp1 > -5 && temp < 0)) && (pad1 == 'N' && pad1 == 'n'))
- {
- CWL("Drugarice idu u Mostar!");
- }
- else if (((temp1 > 20 && temp1 < 30) || (temp1 > -5 && temp < 0)) && (pad1 == 'N' && pad1 == 'n'))
- {
- CWL("Drugarice idu u Bihac!");
- }
- else if (((pad == 'N' || pad == 'n') && (temp > 5 && temp < 20)) || ((temp > -5 && temp <= 0) && (pad == 'D' || pad == 'd')))
- {
- CWL("Anja i Elma mogu u Sarajevo.");
- }
- else if (((pad1 == 'N' || pad1 == 'n') && (temp1 > 5 && temp1 < 20)) || ((temp1 > -5 && temp1 <= 0) && (pad1 == 'D' || pad1 == 'd')))
- {
- CWL("Anja i Elma mogu u Mostar.");
- }
- else if (((pad2 == 'N' || pad2 == 'n') && (temp2 > 5 && temp2 < 20)) || ((temp2 > -5 && temp2 <= 0) && (pad2 == 'D' || pad2 == 'd')))
- {
- CWL("Anja i Elma mogu u Bihac.");
- }
- else if (((temp > -5 && temp < 5) || (temp > 20)) && (pad == 'N' || pad == 'n'))
- {
- CWL("Anja i Una mogu u Sarajevo.");
- }
- else if (((temp1 > -5 && temp1 < 5) || (temp1 > 20)) && (pad1 == 'N' || pad1 == 'n'))
- {
- CWL("Anja i Una mogu u Mostar.");
- }
- else if (((temp2 > -5 && temp2 < 5) || (temp2 > 20)) && (pad2 == 'N' || pad2 == 'n'))
- {
- CWL("Anja i Una mogu u Bihac.");
- }
- else if (((temp > 20 && temp < 30) || (temp > -5 && temp < 5)) && (pad == 'N' || pad == 'n'))
- {
- CWL("Elma i Una mogu u Sarajevo.");
- }
- else if (((temp1 > 20 && temp1 < 30) || (temp1 > -5 && temp1 < 5)) && (pad1 == 'N' || pad1 == 'n'))
- {
- CWL("Elma i Una mogu u Mostar.");
- }
- else if (((temp2 > 20 && temp2 < 30) || (temp2 > -5 && temp2 < 5)) && (pad2 == 'N' || pad2 == 'n'))
- {
- CWL("Elma i Una mogu u Bihac.");
- }
- else
- {
- CWL("Ne odgovara niti jedan grad.");
- }
- }
- }
- */
- // Bankomat
- /*using System;
- class Program
- {
- static void Main()
- {
- int n,a,b,c,f,w,q,s,l,H,m;
- do
- {
- Console.WriteLine("Unesite iznos: ");
- n = Convert.ToInt32(Console.ReadLine());
- } while (n < 0);
- a = n % 50;
- b = n / 50;
- Console.WriteLine(b + " novcanice od 50KM");
- c = a % 20;
- f = a / 20;
- Console.WriteLine(f + " novcanica od 20");
- w = c % 10;
- q = c / 10;
- Console.WriteLine(q + " novcanica od 10");
- s = w % 5;
- l = w / 5;
- Console.WriteLine(l + " novcanica od 5");
- H = s % 2;
- m = s / 2;
- Console.WriteLine(m + " novcanica od 2");
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement