C++ Question

This is an Islamic law that Muslims should pay their Zakat with the rate of 2.5%, means in Rs 100 they should pay Rs 2.5 as Zakat amount.

Write a simple program which asks from the user The total amount and then it calculate and display the Zakat on this amount.
For example the output should look like this.

Output:
Enter the total amount : 107675

Zakat on Amount 107675 is Rs. 2691.88

Please Help me Friends

What is the problem? It's an input, a simple calculation and an output.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream> 

using namespace std;

int main () 
{
  double amount = 0;
  cout << "Enter the total amount : ";
  cin >> amount;
  double zakat = amount * 2.5 / 100;
  cout << "Zakat on Amount " << amount << " = " << zakat;
  cout << "\n\n";
  system("pause");
  return 0;
}
Topic archived. No new replies allowed.