Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question #1: Write a program that : • reads a string. • Then passes it to a func

ID: 3622693 • Letter: Q

Question

Question #1:
Write a program that :

• reads a string.
• Then passes it to a function ChangeCase . The function should change the case of each letter.
• Examples: School ? sCHOOL
aMaN ? AmAn
COMPuter ? compUTER

Note: Use functions: tolower(ch), toupper(ch), islower(ch) and isupper(ch).

Question #2:
Use one –dimensional array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receive $200 plus 9 percent of $5000, or total of $650. Write a program (using an array of counters)that determines how many of the salespeople earned salaries in each of the following ranges(assume that each salesperson's salary is truncated to an integer amount):
a) $200-$299
b) $300-$399
c) $400-$499
d) $500-$599
e) $600-$699
f) $700-$799
g) $800-$899
h) $900-$999
i) $1000 and over

Question #3:

Assume that a sales man in stationery asks you to write a program to help in managing the books information. Each book has a title, author name, edition no, publisher, ISBN, price. ISBN number is a unique number for each book.
To represent and manage books information in your program, use parallel arrays; array for each piece of information. use a continue menu to enable the user to do the following:
• Add new book to the list. Ask the use to enter the book information. Check if the ISBN is for one of the books in the list display an error message; otherwise add it to the list. Make sure that the list is not full.
• Update book information; prompt the user to enter the book ISBN , then ask the user to enter the other details. Display appropriate message if the ISBN is not valid
• Delete a book; ask the user to enter the ISBN. If the ISBN is valid, display the book information and then ask the user to confirm the deletion process.
• Display a list of all books. Books information should be organized in a table. use formatting manipulators.
• Display the titles of the books which have number of copies less than five.
• Sort books information by title.
• Sort books information by publisher.
• check whether a book is available or not, by ask the user to enter the book title and if it available display

Explanation / Answer

please rate - thanks

CRAMSTER rule 1 question per post --this is 3

#include <iostream>
#include <string.h>
using namespace std;
void changecase(string&);
int main()
{string input;
cout<<"Enter a string: ";
getline(cin,input);
changecase(input);
cout<<"Your new string is: "<<input<<endl;
system("pause");
return 0;
}
void changecase(string& a)
{int i;
for(i=0;a[i]!='';i++)
    if(islower(a[i]))
        a[i]=toupper(a[i]);
    else if(isupper(a[i]))
         a[i]=tolower(a[i]);
}