Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to compute total cost including different taxes

Posted By: Luete Fischer     Category: C Programming     Views: 5617

Write a program to compute total cost including different taxes.

Code for Program to compute total cost including different taxes in C Programming

#include<stdio.h>

void main()
{

float number1,number2;

printf("Enter the cost =>");
if(scanf("%f",&number1)==1)
{

    number2=number1+(number1*0.15)+(number1*0.10)+(number1*0.05)+(number1*0.01);
    printf("Total cost Rs.%11.2f",number2);
}
else
{
    printf("Error,try again");
}

}

===============================OUTPUT=================================


Enter the cost =>1232
Total cost Rs.    1613.92
  
Share: 


Didn't find what you were looking for? Find more on Program to compute total cost including different taxes Or get search suggestion and latest updates.

Luete Fischer
Luete Fischer author of Program to compute total cost including different taxes is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!