NEEDED IN C# Suppose the government gives child tax credit to households whose t
ID: 3662778 • Letter: N
Question
NEEDED IN C# Suppose the government gives child tax credit to households whose taxable income is $85,000 or less. A household can claim $1000 tax credit for each child, but the total child tax credit a household can claim cannot exceed $4500. Create a C# console application to calculate child tax credit a household can claim. The program asks for the taxable income and the number of children in the household. It calculates and displays the child tax credit this household can claim. Use decimal type variables to store data related to money.
Explanation / Answer
/*Console application on Child tax of family */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace governmenttax
{
class Childtax
{
static void Main(string[] args)
{
//childtax varaible
int childtax,childnum,totaltax;
//child details
Console.Write("Enter a How many childs have in your family: ");
childnum = int.Parse(Console.ReadLine());
if (childnum >4 and totaltax>85000)
{
totaltax = totaltax+4500; /* $4500 means 4500x60*/
}
else{
totaltax = totaltax+(childnum *1000) ; /* $1000 means 1000x60*/
}
console.Write("The total credit a family");
console.Write(totaltax);
}
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.