Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. Console.Write("Kérem adjon meg egy napot: ");
  2. string beNap = Console.ReadLine();
  3. Console.Write("Kérem adjon meg egy óra számot: ");
  4. int beOra = Convert.ToInt32(Console.ReadLine());
  5.  
  6. int c = 0;
  7.  
  8. for (int i = 0; i < n; i++)
  9. {
  10. if (MelyikNap(honap[i], nap[i]) == beNap)
  11. {
  12. if(beOra < 0 || beora > hianyzas[i].Length-1){
  13. {
  14. Console.WriteLine("Nincsen {0}. óra", beOra);
  15. }
  16. else
  17. {
  18. if(!(hianyzas[i][beOra] == 'O' || hianyzas[i][beOra] == 'N'))
  19. {
  20. c++;
  21. }
  22. }
  23. }
  24. }
  25.  
  26. Console.WriteLine("{0}ként, a(z) {1}. órákban {2} hiányzás volt összesen", beNap, beOra, c);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement