the problem is that my c# calculation answer must say is it kevad,suvi,sügis or talv in my program,the program is here
int vastus1, vastus2, vastus3;
do
{
Console.WriteLine("Sisesta esimene arv vahemikus 10-20");
vastus1 = int.Parse(Console.ReadLine());
Console.WriteLine("sisesta teine arv vahemikus 20-32");
vastus2 = int.Parse(Console.ReadLine());
Console.WriteLine("Vastus {0}", vastus2 - vastus1);
string tekst1 = Console.ReadLine();
vastus3 = int.Parse(tekst1);
}
while ((vastus1 < 1 || vastus2 < 12));
if (vastus3 <= 3 && vastus3 <= 5)
{
Console.WriteLine("On kevad");
{
if (vastus3 <= 6 && vastus3 <= 8)
{
Console.WriteLine("on suvi");
}
if (vastus3 <= 9 && vastus3 <= 11)
{
Console.WriteLine("on sügis");
}
if (vastus3 <= 12)
if (vastus3 <= 1 && vastus3 <= 2)
{
Console.WriteLine("on talv");
}
}
}
}
}
}
VulpesPosted Mar 13, 2013, 4:53 PM
karli hujoovaPosted Mar 13, 2013, 1:53 PM
and the object of program is that insert 1 number between 10-20 and 2nd number between 20-32 repeat calculation till answer is between 1-12 and from that calculation it must say is it kevad,talv,suvi or sügis hopes thats little more logical
VulpesPosted Mar 12, 2013, 6:22 AM
Jignesh TrivediPosted Mar 12, 2013, 1:02 AM
can you please share actual logic or requirement so that we can double check you implimentation?