Write some Software

Cerrado

Descripción

I need a C program that builds on already existing code:

#include<stdio.h>

#include<stdlib.h>

//Taking the default size is 20 and if required it will be increased or decreased

int arraySize = 20;

//Taking the input from user and adjusting the arraySize based on number of inputs

void checkAndReallocateOnlyUsedLocations(double * arr , int count)

{

if(count < arraySize)

{

arr = realloc(arr , count * sizeof(double));

arraySize = count;

}

}

void takeInputGrades(double * arr)

{

double x = 0;

printf("Please enter gradres -1 to end: \n");

int count = 0;

while(x != [url removed, login to view])

{

scanf("%lf" , &x);

arr[count++] = x;

if(count == arraySize)

{

arraySize *= 2;

arr = realloc(arr,arraySize * sizeof(double));

}

}

checkAndReallocateOnlyUsedLocations(arr,count-1);

}

//Finding the average

double findAvg(double * arr)

{

int i = 0 ;

double sum = 0.0;

for(i = 0 ; i < arraySize ; i++)

{

sum += arr[i];

}

return (sum / arraySize);

}

//Finding the highest

double findHighest(double * arr)

{

double highest = arr[0];

int i = 0 ;

for(i = 1; i < arraySize ; i++ )

{

if(arr[i] > highest)

highest = arr[i];

}

return highest;

}

//Finding the lowest

double findLowest(double * arr)

{

double lowest = arr[0];

int i = 0 ;

for(i = 1; i < arraySize ; i++ )

{

if(arr[i] < lowest)

lowest = arr[i];

}

return lowest;

}

int main()

{

double * array = (double *) malloc(arraySize * sizeof(double));

takeInputGrades(array);

printf("Grades you entered: ");

int i = 0 ;

for(i = 0 ;i < arraySize ; i++)

{

printf("\n%.2f\n" , array[i]);

}

printf("\nAverage grade is : %.2f\n" , findAvg(array));

printf("Highest grade is : %.2f\n" , findHighest(array));

printf("Lowest grade is : %.2f\n" , findLowest(array));

free(array);

return 0;

}

The above code must be modified to use a custom struct to hold student's ID numbers and the percentage score for each item entered into the grade book. The program should accept the entry of ID numbers and percentage grades (0–100) until the user signals that he or she is done entering grades. The program should then print out the ID numbers and grades entered by the user, sorted by ID number.

Habilidades: PHP, Arquitectura de software

Ver más: software write articles free, software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, program reads numbers text file sorts highest lowest, software write websites idea, software write book images, software write books, sample java program finding highest lowest score, arthemia modified free, software write protection, free software write book, software write book, write quality unique articles 100 error free, software write protect software, software write technical manual

ID de proyecto: #12027195

Adjudicado a:

HafizShahan

hey i have done this program with you previously and can change now as you want you messaged me i can do it please come in inbox :-) regards

$25 USD en 1 día
(4 comentarios)
1.6

10 los freelancers están ofertando un promedio de $25 para este trabajo.

$20 USD en 1 día
(704 comentarios)
6.9
crazynightwalker

Hi! I have 12 years of C and C++ experience. I checked your source code and requirements - I can complete this today, within the next few hours.

$20 USD en 1 día
(86 comentarios)
5.3
alliedsoftwares

Dear Sir, Your company recently advertised for website developer . After reading the job description I am confident that I would be a perfect fit for this position as my experience and abilities precisely match your r Más

$222 USD en 10 días
(10 comentarios)
4.7
$20 USD en 1 día
(19 comentarios)
4.3
$55 USD en 1 día
(6 comentarios)
3.1
raulbehl

Hello! Please check my reviews to know a bit about me and my work.

$20 USD en 1 día
(5 comentarios)
2.2
raheelwaqar3

Hello Sir, Raheel here. I've done too many projects in C having great knowledge about it. I assure you that I'll deliver your project on time and you can also visit my profile for surety. I hope you will consider mA Más

$25 USD en 1 día
(4 comentarios)
1.9
$30 USD en 1 día
(0 comentarios)
0.0
$25 USD en 1 día
(0 comentarios)
0.0
tk2

$15 USD en 1 día
(1 comentario)
0.0
bmbmobile3

Hi, this is mahesh The project is still open.??? I have completed the job, could not send the file in chat window due to some error. Ping me in chat window i will forward u the c file.

$20 USD en 0 días
(0 comentarios)
0.0