Question
Intro to computing

Category - a (>= 25000), b (20000-25000), C (15000 - 20000), D (10000-15000), e (< 10000) In Main • Create 3 arrays (id-int[]
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: Hey dear student finds the solution of your query if you have any doubt feel free to ask. Thanks!!

#include<iostream>
#include<iomanip>
using namespace std;
void input(int id[10],char cate[10],double sal[10]); //prototype of function
void output(int id[10],char cate[10],double sal[10]); //prototype of function

int main() //main function
{
//three arrays of declaration
int id [10];
char category[10];
double salary[10];
input(id,category,salary); //call input()
output(id,category,salary); //call output()
return 0;
}
void input(int id[10],char cate[10],double sal[10]) //function definition pssing 3 arrays as parameters
{
for(int i= 0;i<=9;i++)
{
cout<<"Enter ID: "; //takes input from user
cin>>id[i];
cout<<"Enter Category:";
cin>>cate[i];
cout<<"Enter Salary:";
cin>>sal[i];
}
}
void output(int id[],char cate[],double sal[])//function definition pssing 3 arrays as parameters
{
double total =0 ;
cout<<"ID"<<setw(15)<<"Category"<<setw(15)<<"Salary"; //output all details
cout<<"\n_________________________________";
cout<<"\n";
for(int i=0;i<=9;i++)
{
total = sal[i]+total;
if(id[i]==10)
{
cout<<id[i]<<setw(14)<<cate[i]<<setw(15)<<sal[i];
}
else
{
cout<<id[i]<<setw(15)<<cate[i]<<setw(15)<<sal[i];
cout<<"\n";
}
}
cout<<"\nTotal: $"<<total; //print total of all salaries
}

LILCI JalalY-JJUUU Category Salary ୨and one ¢¢E 93 4 ୨ A GE 25@@@ 255@g 21ood 18ood 1450 । 98@g 125@g 16@@@ 355@@ 35@@@ | 10

Add a comment
Know the answer?
Add Answer to:
Intro to computing Category - a (>= 25000), b (20000-25000), C (15000 - 20000), D (10000-15000),...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please help with this excel questions. I am using office 360 LL А B C с...

    Please help with this excel questions. I am using office 360 LL А B C с D E 1. Name October Sales November Sales December Sales Comission 2 Den 15000 16000 12000 3 Scott 16000 20000 15000 4. Colin 11000 9000 15000 5 Dustin 20000 10000 16000 6 Mike 25000 8000 13000 7 James 14000 16000 12000 8 Yvette 15000 18000 16000 9 Karl 11000 12000 18000 10 Frank 21000 15000 12000 11 Required 1: Create a single formula in...

  • Write a code in C++ by considering the following conditions :- Tasks :- 1. Create a...

    Write a code in C++ by considering the following conditions :- Tasks :- 1. Create a class Employee (with member variables: char * name, int id, and double age). 2. Create a constructor that should be able to take arguments and initialize the member variables. 3. Create a copy constructor for employee class to ensure deep copy. 4. Create a destructor and de allocate the dynamic memory. 5. Overload the assignment operator to prevent shallow copy and ensure deep copy....

  • C programming language Purpose The purpose of this assignment is to help you to practice working...

    C programming language Purpose The purpose of this assignment is to help you to practice working with functions, arrays, and design simple algorithms Learning Outcomes ● Develop skills with multidimensional arrays ● Learn how to traverse multidimensional arrays ● Passing arrays to functions ● Develop algorithm design skills (e.g. recursion) Problem Overview Problem Overview Tic-Tac-Toe (also known as noughts and crosses or Xs and Os) is a paper-and-pencil game for two players, X and O, who take turns marking the...

  • 9 We want to find out the courses that each student is not enrolled in. Give a listing of the course descriptions, and the students (lname) who are not taking that specific course (Use a cartesi...

    9 We want to find out the courses that each student is not enrolled in. Give a listing of the course descriptions, and the students (lname) who are not taking that specific course (Use a cartesian product and union it with a minus) drop table student_class; drop table student; drop table class; create table student ( ssn char(11) not null, lname varchar(40) not null, fname varchar(20) not null, phone char(12), address varchar(40), city varchar(20), state char(2), zip char(5), dob date,...

  • Santa Monica College CS 20A: Data Structures with C++ Spring 2019 Name: True/False: Circle one Assignment...

    Santa Monica College CS 20A: Data Structures with C++ Spring 2019 Name: True/False: Circle one Assignment 1 ID: 1. True / False 2. True / False 3. True / False 4. True / False 5. True / False 6. True / False 7. True / False 8. True / False 9. True / False 10. True / False Variable and functions identifiers can only begin with alphabet and digit. Compile time array sizes can be non-constant variables. Compile time array...

  • C++ Purpose: To practice arrays of records, and stepwise program development. 1. Define a record data...

    C++ Purpose: To practice arrays of records, and stepwise program development. 1. Define a record data type for a single playing card. A playing card has a suit ('H','D','S',or 'C'), and a value (1 through 13). Your record data type should have two fields: a suit field of type char, and a value field of type int. 2. In main(), declare an array with space for 52 records, representing a deck of playing cards. 3. Define a function called initialize()...

  • Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there a...

    Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there are no class _descriptions display 'No description is available yet'. (USE NVL) 2 Give a listing of only the lname and the class_code for students who are taking 'Introduction to C programming'. (Inner join) 3 Give a lising of all the class_descriptions and the number...

  • Java Description Write a program to compute bonuses earned this year by employees in an organization....

    Java Description Write a program to compute bonuses earned this year by employees in an organization. There are three types of employees: workers, managers and executives. Each type of employee is represented by a class. The classes are named Worker, Manager and Executive and are described below in the implementation section. You are to compute and display bonuses for all the employees in the organization using a single polymorphic loop. This will be done by creating an abstract class Employee...

  • Using Doubly Linked List, and Sorting methods: (In Java) (please attach your output with the answer)...

    Using Doubly Linked List, and Sorting methods: (In Java) (please attach your output with the answer) (Please answer if it is correct and working) (Have been getting many wrong and spam answers lately) Introduction: In this project, we use the same file structure of Artist and Art to extend the concepts of array and linked list and have them applied to sorting. The input files of p1arts.txt and p1artists.txt have been slightly modified. They are named p7arts.txt and p7artists.txt. Assignments:...

  • Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In...

    Using Merge Sort: (In Java) (Please screenshot or copy your output file in the answer) In this project, we combine the concepts of Recursion and Merge Sorting. Please note that the focus of this project is on Merging and don't forget the following constraint: Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT