Computer Science, asked by pranavpuri06, 7 months ago

public class Project
{
public static void main(String args[],int c)
{
{
double amount;
double discount=0;
if (c<=20000)
discount=(c*5)/100;
else if (c>=20001&&c<=40000)
discount=((20000*5)/100+((c-20000)*7)/100);
else if (c<=40001&&c>=70000)
discount=((20000*5)/100+(20000*7)/100+((c-40000)*10)/100);
else if (c>70001)
discount=((20000*5)/100+(20000*7)/100+(30000*10)/100+((c-70000)*12.5)/100);
amount=c-discount;
System.out.println("amount is"+amount);

}
}
}





What is wrong in this?? It is showing main class not foundpublic class Project
{
public static void main(String args[],int c)
{
{
double amount;
double discount=0;
if (c<=20000)
discount=(c*5)/100;
else if (c>=20001&&c<=40000)
discount=((20000*5)/100+((c-20000)*7)/100);
else if (c<=40001&&c>=70000)
discount=((20000*5)/100+(20000*7)/100+((c-40000)*10)/100);
else if (c>70001)
discount=((20000*5)/100+(20000*7)/100+(30000*10)/100+((c-70000)*12.5)/100);
amount=c-discount;
System.out.println("amount is"+amount);

}
}
}





What is wrong in this?? It is showing main class not found​

Answers

Answered by AnindaBasu
1

Answer:

In public static void main only string args[ ] and also the value of the amount is not given it will not show the result

Similar questions