/* This program reads incomes until end of file and prints the tax due. Income under 6000 greenbacks is taxed at 30 percent, and income greater than or equal to 6000 greenbacks is taxed at 60 percent. We assume that the income is an integer. The tax is written as an integer. */ #include main() { int income, tax; while ( scanf( "%d", &income ) != EOF ) { printf( "Income = %d greenbacks\n", income ); if ( income < 6000 ) tax = 0.3 * income; else tax = 0.6 * income; printf( "Tax = %d greenbacks\n", tax ); } }