Anonim_999

RazumovaDuraEnabaya

Feb 3rd, 2023
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace testing1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. Product tov = new Product(123456, "Молоток", 120.75);
  10. Console.WriteLine("\n Введите имя клиента и количество товара\n");
  11. Order.Clien_name = Console.ReadLine();
  12. Order.Product_Quan = int.Parse(Console.ReadLine());
  13. Order.Cost = tov.get_price() * Order.Product_Quan;
  14. Console.WriteLine("\nКлиент + " + Order.Client_Name + "заказал товар\n" + tov.get_name() + "(штрих код " + tov.get_num() + ") в количестве " + Order.Product_Quan + "\nна сумму", + Order.Cost);
  15. Console.ReadKey();
  16. }
  17. }
  18. class Myclass
  19. {
  20. public Myclass()
  21. {
  22.  
  23. }
  24.  
  25. }
  26. class Product
  27. {
  28. private int Prod_Num;
  29. private string Prod_Name;
  30. private double Price;
  31.  
  32. public Product(int Num, string Name, double Pr)
  33. {
  34. Prod_Num = Num;
  35. Prod_Name = Name;
  36. Price = Pr;
  37. }
  38. public int get_num()
  39. {
  40. return Prod_Num;
  41. }
  42. public string get_name()
  43. {
  44. return Prod_Name;
  45. }
  46. public double get_price()
  47. {
  48. return Price;
  49. }
  50. }
  51. class Order
  52. {
  53. private static double Order_Cost;
  54. private static string Client_Name;
  55. private static int Product_Quan;
  56. }
  57. }
  58.  
Advertisement
Add Comment
Please, Sign In to add comment