Find Jobs
Hire Freelancers

Write some Software

$10-30 USD

Dokončeno
Zveřejněno před více než 7 roky

$10-30 USD

Zaplaceno při doručení
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 != -1.00) { 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.
IČ projektu: 12027195

O projektu

8 nabídky
Vzdálený projekt
Aktivní před 7 roky

Chcete si vydělat nějaké peníze?

Výhody podávání nabídek na Freelancer

Stanovte si rozpočet a časový rámec
Získejte za svou práci zaplaceno
Načrtněte svůj návrh
Registrace a podávání nabídek je zdarma
Uděleno:
Avatar uživatele
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 v 1 dni
5,0 (14 recenze)
5,1
5,1
8 freelanceři nabízejí v průměru $22 USD za tuto práci
Avatar uživatele
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 v 1 dni
4,9 (108 recenze)
5,8
5,8
Avatar uživatele
Hello! Please check my reviews to know a bit about me and my work.
$20 USD v 1 dni
5,0 (15 recenze)
3,9
3,9
Avatar uživatele
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 mAe to do your task Thanks
$25 USD v 1 dni
4,9 (8 recenze)
2,9
2,9
Avatar uživatele
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 v 0 dni
5,0 (1 recenze)
1,5
1,5

O klientovi

Pochází z UNITED STATES
Newington, United States
5,0
2
Ověřená platební metoda
Členem od říj 31, 2016

Ověření klienta

Další zakázky od tohoto klienta

simple program
$10-30 USD
Díky! Poslali jsme vám e-mailem odkaz pro získání kreditu zdarma.
Při odesílání e-mailu se něco pokazilo. Zkuste to prosím znovu.
Registrovaných uživatelů Zveřejněných projektů
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Načítání náhledu
Bylo uděleno povolení ke geolokaci.
Vaše doba přihlášení vypršela a byli jste odhlášeni. Přihlaste se znovu.