Computer Science, asked by Devansy6365, 1 year ago

Write a program to input the name age and taxable income of person .if age is more than 60 years then display the message wrong category


mebijay: in which programming language ?

Answers

Answered by rohanbarnwal97
1
please tell me the language like python,c++,c etc..
Answered by Anonymous
3

import java.util.*;

public class Tax

{

public static void main (String args [])

{

Scanner in = new Scanner (System.in);

int b,c;

String a , g ;

System.out.println(" enter your name:");

a = in.nextLine();

System.out.println(" enter your age:");

b = in.nextInt();

System.out.println("enter your gender (male or female) :");

g = in.nextLine();

System.out.println(" enter your taxable income:");

c = in.nextInt();

if (b > 65)

{

System.out.println("Wrong Category !");

}

else if (c <= 250000)

{

System.out.println(" Nil ");

}

else if (c > 250000 && c <= 500000)

{

c = ((c - 160000)* 10/100);

System.out.println(" Payable tax = Rs" +c);

}

else if (c> 500000 && c<= 1000000)

{

c = ((c-500000) * 20/100 + 34000);

System.out.println( "Payable tax = Rs" +c);

}

else if (c> 1000000)

{

c = ((c- 1000000) * 30/100 + 94000);

System.out.println(" Payable tax = Rs" +c);

}

}

}

Similar questions