Write a java program to check if man gets 1000 rupees from birth on hi every birthday till his 100th birthday will he become multi millionaire
Answers
Answered by
1
class Millionaire
{
public static void main (String args[])
{
int a = 1000, i;
for (i = 0; i <= 100; i++)
{
a += 1000;
}
if (a > 1000000) //If a is greater than 1 million
{
System.out.println("Congratulations!! The man has become a multi millionaire...");
}
else
{
System.out.println("Sorry, the man hasn't become a multi millionaire!");
}
}
}
Hope it helps...
Please follow to get more answers!
Thanks;
{
public static void main (String args[])
{
int a = 1000, i;
for (i = 0; i <= 100; i++)
{
a += 1000;
}
if (a > 1000000) //If a is greater than 1 million
{
System.out.println("Congratulations!! The man has become a multi millionaire...");
}
else
{
System.out.println("Sorry, the man hasn't become a multi millionaire!");
}
}
}
Hope it helps...
Please follow to get more answers!
Thanks;
Similar questions