Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4250486
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:32:06+00:00 2026-05-21T04:32:06+00:00

Okay! I really need your help or some tips I need a program that

  • 0

When I build the solution

Okay! I really need your help or some tips
I need a program that I will recieve a raise on my previous years salary. I need to calculate and display the amount of annual raises for the next three years. I want to use the rates o 3% 4% 5% and 6%.

This is what I have so far but its not working

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    int beginSalary  = 0;
    double newSalary = 0.0;
    double raise     = 0.0;
    double theRate = 0.0;

    cout << "Beginning Salary (negative number or 0 to end): ";
    cin >> beginSalary;

 do 
 {

        // 3 percent
        newSalary = (beginSalary+(beginSalary*3/100)); 
        raise = newSalary-beginSalary; 
        cout << raise << endl; 
        cout << endl;


        // 4 percent
        newSalary = (beginSalary+(beginSalary*4/100)); 
        raise = newSalary-beginSalary; 
        cout << raise << endl;


        // 5 percent
        newSalary = (beginSalary+(beginSalary*5/100)); 
        raise = newSalary-beginSalary;  
        cout << raise << endl; 
        cout << endl;

        // 6 percent
        newSalary = (beginSalary+(beginSalary*6/100)); 
        raise = newSalary-beginSalary; 
        cout << raise << endl; 
        cout << endl;

    } while ( newSalary != 0);

    return 0;
}   //end of main function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:32:06+00:00Added an answer on May 21, 2026 at 4:32 am

    What you want to do is this:

    int beginSalary;
    do {
        cout << "Beginning Salary (negative number or 0 to end): ";
        cin >> beginSalary;
        if (beginSalary <= 0) break;
    
        for (int percent = 3; percent <= 6; percent++)
        {
            cout << endl << "Raise for " << percent << "% for the next three years: " << endl;
            double salary = beginSalary;
            for (int year = 1; year <= 3; year++)
            {
                double raise = salary * percent / 100.0;
                salary += raise;
                cout << "Year " << year << ": " << raise << ". ";
            }
        }
    } while (1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I really need some help with this. I'm new with designing and stuff,
Okay...I'm really getting a bit frustrated with this. I know that this post will
Could really do with some help. So I've got the 2 arrays like so
Okay, I'm confused here. I have a properties file with some SQL scripts that
Okay so I need to push the array that is fetched from a few
okay...im really puzzled with this. I want to create a regular asp.net webforms website
Okay I wasn't really sure how to word this question, but basically what I
Okay this is probably a really dumb question, however it's really starting to hurt.
Okay I know this is a really lame question because Starbasic is a really
Okay, This may be really simple or it may not even be possible, or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.