Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1.  
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ZADANIE01
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Podaj liczbę całkowitą");
  14. int a = Convert.ToInt(Console.ReadLine());
  15.  
  16. string b = a % 3 ? "podzielna przez 3" : "niepodzielna przez 3";
  17.  
  18. if (a % 3) b = "podzielna przez 3";
  19. else b = "niepodzielna przez 3";
  20.  
  21. string b = a % 5 ? "podziwelna przez 5" : "niepodzielna przez 5";
  22.  
  23. if (a % 5) b = "podzielna przez 5";
  24. else b = "niepodzielna przez 5";
  25.  
  26. Console.ReadKey();
  27.  
  28.  
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement