Find Jobs
Hire Freelancers

Basic Code C++ using Struct: Employee Details

$10-30 USD

In Progress
Posted over 4 years ago

$10-30 USD

Paid on delivery
I would like for someone to fix my code as the output is not what i hoped for heres my code: #include <iostream> #include <string> using namespace std; struct Employee { int emp_no; string ename; string job; float salary; float bonus; }; int main() { Employee arr[10]; cout<<"Please enter the employee info"<<"\n"; for(int i=1; i<10; i++) { cout<< "Enter employee no "<<"\n"; cin>>arr[i].emp_no; cout<< "Enter employee ename "<<"\n"; cin>>arr[i].ename; cout<< "Enter employee's job "<<"\n"; cin>>arr[i].job; cout<< "Enter employee bonus"<<"\n"; cin>>arr[i].bonus; if (arr[i].job == "senior lecturer") { arr[i].salary = 6000; } else if (arr[i].job == "Lecturer") { arr[i].salary = 5000; } else if (arr[i].job == "Admin Assistant") { arr[i].salary = 2500; } else arr[i].salary = 1500; for(int i=1; i<10; i++) { cout<<"Employee number"<<" " <<arr[i].emp_no<<"\n"; cout<<"Employee ename"<<" " <<arr[i].ename<<"\n"; cout<<"Employee job"<<" " <<arr[i].job<<"\n"; cout<<"Employee salary"<<" " <<arr[i].salary<<"\n"; cout<<"Employee bonus"<<" " <<arr[i].bonus<<"\n"; } } }
Project ID: 23396605

About the project

5 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
5 freelancers are bidding on average $24 USD for this job
User Avatar
Hello I am C++ expert and interested in the project. I have reviewed attached file and your codes and confident to handle the project perfectly. Please communicate to discuss further. Regards Anshu
$30 USD in 1 day
4.7 (324 reviews)
7.1
7.1
User Avatar
Hello, i'm interested in your project. Please send me a message so that we can discuss more. I prefer to submit my detailed proposal after our discussion. Note: + We are flexible with changes. + https://www.freelancer.com/u/arjun366333 - myprofile link + We also provide post-implementation application support &maintenance Thanks, regards Kanta Singh.
$20 USD in 7 days
4.4 (32 reviews)
6.1
6.1
User Avatar
Hi, This is Jin from China. I have checked your project description and I understood your requirements fully. I have experience in c++ programming, so I am very confident about your project. Especially I had developed the similar with your requirements. Please discuss more details through chat. Looking forward to your reply. Regards.
$30 USD in 1 day
5.0 (4 reviews)
2.7
2.7
User Avatar
I love to code and I have been using c++,c,java,python for my personal project from a long time and I solved so many competitive programming question using these languages.
$20 USD in 7 days
5.0 (3 reviews)
1.3
1.3

About the client

Flag of MALAYSIA
Putrajaya, Malaysia
5.0
3
Payment method verified
Member since Jan 8, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.