Calculating Gross Pay (C++ Sample Program)

Coding With Farhan

A C++ Program To Calculate Gross Pay

#include <iostream>

using namespace std;


void printDescription();

void grossPay();


int main()

{

printDescription();

grossPay();

}

void printDescription()

{

cout << "*************************************************************************" << endl;

cout << "This program takes two numbers (pay rate and hours) and outputs gross pay. " << endl;

cout << "*************************************************************************" << endl;

}

void grossPay()

{

int a, b, grosspay;

cout << "Enter Pay Rate :- ";

cin >> a;

cout << "Enter Number Of Hours :- ";

cin >> b;

grosspay = a * b;

cout << "Gross Pay Is :- "

<< "$" << grosspay;

}

Thank You

I Hope You Will Like This Program

If You Have Any Queries Let Me Know In The Comments Section


Comments

Post a Comment

Popular posts from this blog

. An array stores details of 25 students (rollno, name, marks in three subjects). Write a program to create such an array and print out a list of students who have failed in more than one subject.

Matching Last Character (C++ Sample Program)