Computer Science, asked by kartikbhoriya9563, 1 year ago

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 Rajdeep11111
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;

Similar questions