Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n, d=0, e=0, f;
  14. n = Convert.ToInt32(Console.ReadLine());
  15.  
  16. if (n > 99) {
  17. d = n - 99;
  18. }
  19. if (n > 9 && n < 100) {
  20. e = n - 9;
  21. }
  22. f = (d * 3) + (e * 2) + 9;
  23. Console.WriteLine(f);
  24. Console.ReadKey();
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement