C programming question

AmalMadina

Commendable
May 22, 2016
5
0
1,510
0
Write a complete C program that reads 55 salaries from a file called “salaries.txt”. Your
program should store the salaries in an array of double values. Then you should send the
array to a function called raiseSalaries which will give a raise to each salary based on the
following rules:
1. Salary less or equal 700, give a raise = 4%
2. 700< salary <=1000, give a raise = 7%
3. 1000< salary <=1500, give a raise = 9%
Then your program should call another function called getMaxMin which accepts the
array, and returns using pointers the largest and lowest salaries. Finally your program will
print max and min salaries and also all new salaries on screen.
 

USAFRet

Illustrious
Moderator


Dozens of people out here could create this, in multiple languages. And just give you the answer.
But you will have learned zero.

What needs to happen is:
You create something
Compile it
Run it
It fails
Post the code here
Then....we out here might say "Oh, your syntax on Line 18 is incorrect"
 

AmalMadina

Commendable
May 22, 2016
5
0
1,510
0

Excuse me, im asking for this question , so i need the write answer, but the question formula is given in this way, sorry if it is any mistake

 

rgd1101

Titan
Moderator


Your only mistake, you need to do your own work to learn from it.
 

USAFRet

Illustrious
Moderator


Dozens of people out here could create this, in multiple languages. And just give you the answer.
But you will have learned zero.

What needs to happen is:
You create something
Compile it
Run it
It fails
Post the code here
Then....we out here might say "Oh, your syntax on Line 18 is incorrect"
 
Thread starter Similar threads Forum Replies Date
T Apps General Discussion 10
L Apps General Discussion 1
P Apps General Discussion 1
Rainfire Apps General Discussion 3
SwissxPiplup Apps General Discussion 3
G Apps General Discussion 6
S Apps General Discussion 1
P Apps General Discussion 1
Z Apps General Discussion 2
Z Apps General Discussion 7
M Apps General Discussion 2
GoldenI Apps General Discussion 3
clydefrog Apps General Discussion 5
D Apps General Discussion 1
CNPS Apps General Discussion 1
Billbob Apps General Discussion 3
G Apps General Discussion 8
N Apps General Discussion 3
rogue woopa Apps General Discussion 1
germanmikrowave Apps General Discussion 2

ASK THE COMMUNITY