deena mohamad

deena mohamad

  • NA
  • 2
  • 6.1k

C++ programe

Apr 28 2013 3:26 PM
please help 

Q1) A sales company has branches in each of the 10 cities: A, B, C, D, E, F, G, H, I, and J. Write a C program to read the amount of sales for each of the 10 branches in the 12 months of the year and store them in a 10x12 matrix. The program should read the sales of each branch on a separate row and should store the sales of each branch in one row of the matrix. All sales amounts are in double values. The program should output the following:
1.The total sales for each branch.
2.The total sales for each of the 12 months.
3.Find the branch that has the total maximum sales.
4.Find the month in which the company has the minimum total sales in all of its branches.

Q2) 
1. Complete the following functions:

//determine the number of characters in N
int L(char N[]){…}

//return 1 if N starts with a vowel and return 0 otherwise 
int start(char N[]){…}

//return 1 if N ends with a vowel and return 0 otherwise 
int end(char N[]){…}

//return 1 if N and its reverse are the same and return 0 otherwise 
int palindrome(char N[]){…}

2. Write a main program to read 30 names each of which does not exceed 20 characters, stores the names in a matrix and prints the following:
1.The length of each of the 30 names. 
2.The number of names that start and end with a vowel.
3.The number of palindrome names.
4.The list of names in reverse order of their input.

The main function should call the functions in (1) to perform the tasks in (2)


Answers (1)