GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 147 of 203    Print  
The company pays a sales person on a commission basis. The sales person receives $200 per week plus 9 % of their gross salary for that week. For ex. if sales person who grosses 5000$ then he paid $650($200+$450).

Write a prog in C++ (using array of counter) that determine how many of the sales person earned salaries in each of following ranges (assume that each sales person salary is truncated to an integer amount) :
a. $200-$299
b. $300-$399 so on..
i. $1000 and over

  
Total Answers and Comments: 1 Last Update: October 21, 2008     Asked by: rakesh mishra 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 21, 2008 13:57:22   #1  
google_ever Member Since: October 2008   Contribution: 1    

RE: The company pays a sales person on a commission basis. The sales person receives $200 per week plus 9 % of their gross salary for that week. For ex. if sales person who grosses 5000$ then he paid $650($200+$450).Write a prog in C++ (using array of cou
int a[8] {0 0 0 0 0 0 0 0};
int b[n]; // Here b is the array of employee's salaries.

for(int iLooper 0; iLooper<n; iLooper++)
iIndex ((int)b[iLooper]/100) > 10) ? 8:((int)b[iLooper]/100)-2;
a[iIndex]++;



 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    

 Related Questions

"Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms 
Latest Answer : C++ enables polymorphism - The ability of obejcts of different classes related by inheritance respond differntly to the same function call. ...

Latest Answer : Hi, for the above answer, i am little bit disagreeing, like VECTOR is UNIDIRECTIONAL ?? what does that mean ?? exactly, you mean to say that we cannot have multidimensional vectors ?? if that is correct, then following definition of multi dimensional ...
Read Answers (4) | Asked by : suji

Latest Answer : if the solution is needed for the unix platform. Then you can create a pthread at the bottom of the program, take the current process id of the parent and make it a deamon by using the standard unix calls like detach(), chdir().. etc. Check if the parent ...
Read Answers (3) | Asked by : suji

Latest Answer : The array is terminated by a NULL character. Hence for array elements the space will be length-1. suppose you have 5 elements in an array. The last position is occupied by NULL character, then space available is 4. If the index will start from 1 then ...
Read Answers (6) | Asked by : rajesh

Latest Answer : In case of Array , the ArrayName is Nothing but a Base Address, when we use [] operator , it treats leftmostvalue as a base address and rightside value as an offset so it adds BaseAddress+Offset and get target addresswhere actually value is stored , BaseAddress+Offset ...
Read Answers (3) | Asked by : Yogini Singh

Hey anybody help me to write code for this programwap which display year,month & day presents in a year for eg.1. no. is 14 print 2 weeks2. no is 90 print 3 months3. no is 365 print 1 yearuser can input any no
Read Answers (3) | Asked by : avingle

Latest Answer : include#includeusing namespace std;int main(){             fstream *obj = new fstream();             obj->open ("main.cpp"); ...
Read Answers (4) | Asked by : arup

Latest Answer : Sorry I was wrong. There is no final in C++. Anybody know how to use Java's final in C++? ...

Write a program to dynamically create a matrix( no of rows and columns wud be provided by user at run time). Then ask a user to input elements and the nprint those elements.

Suppose there is a txt file with following format:Student name Grades in subjectsX ABA+CDA+Y B+CAA+AAthere can be many students with there grades in various subjects. (number of subjects are unknown)Possible values of grade are: A, A+, B, B+, C, D now suppose the file gets corrupted and all '+' are replaced by 'A'Write a program to restore the file
Tags : Restore


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

ERP: More than a Sales Solution

ERP More than a Sales Solution In this globalized world ERP is no longer just a competitive advantage It is an important requirement for every enterprise Many specialists argue that ERP is completely necessary to deal with businesses in every corner of the market This is because ERP does not work in
 

Convert a String into an Integer

How to convert a string into an integer in C program? This is done by using the function named as atoi(). This function atoi() is present in the header file named as &lt;stdlib.h&gt;. When programmers use this function they must include the header file by the statement #include &lt;stdl
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school&rsquo;s al
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.&nbsp; By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.&nbsp; IT Certification offers several vari
 

JavaScript Array Operations

JavaScript Array Operations In this JavaScript tutorial you will learn about different operations with array in JavaScript how to use the for in statement Combining Operations between arrays and within elements of an array joining two or more arrays and joining elements of an arrays along with synta
 

JavaScript Array Object Methods – Part II

JavaScript Array Object Methods Part II In this JavaScript tutorial you will learn about on array object methods slice splice toString shift and unshift methods along with general syntax and examples mosgoogle center slice By using the methods of the array object the programmer is able to retriev
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape