TOPIC

wrong answer 40% c#

youssef salahaldin asked 2 years ago

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;

namespace ConsoleApplication4 { class Program { static void Main(string[] args) { int n,y,b; int x = Convert.ToInt32(Console.ReadLine()); if (x < 365) { n= x / 30; y = x % 30; Console.WriteLine("0" + " " + "ano"+" "+"(s)"); Console.WriteLine(n +" "+ "mes"+" "+"(es)" ); Console.WriteLine(+y +" "+ "dia(s)\n"); } else { b = x / 365; n = x / 360; y = x-(n30+b365); Console.WriteLine(b + " " + "ano(s)"); Console.WriteLine(n + " " + "mes(es)"); Console.WriteLine(+y + " " + "dia(s)\n");

        }
        Console.ReadKey();
    }
}

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.