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 borsa
- {
- class Program
- {
- static void Main(string[] args)
- {
- double N = double.Parse(Console.ReadLine());
- double M = double.Parse(Console.ReadLine());
- int zel = int.Parse(Console.ReadLine());
- int plo = int.Parse(Console.ReadLine());
- if (N < 0 || N > 1000)
- {
- Console.WriteLine("Wrong number");
- }
- else if (M < 0 || M > 1000)
- {
- Console.WriteLine("Wrong number");
- }
- else if (zel < 0 || zel > 1000)
- {
- Console.WriteLine("Wrong number");
- }
- else if (plo < 0 || plo > 1000)
- {
- Console.WriteLine("Wrong number");
- }
- var total = N * zel / 1.94 + M * plo / 1.94;
- Console.WriteLine(total);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement