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 ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n, d=0, e=0, f;
- n = Convert.ToInt32(Console.ReadLine());
- if (n > 99) {
- d = n - 99;
- }
- if (n > 9 && n < 100) {
- e = n - 9;
- }
- f = (d * 3) + (e * 2) + 9;
- Console.WriteLine(f);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement