subject

You have been given 8 C files, each has the same logic, expressed in different ways. Each of the files is incomplete, marked by TBD. You must replace each TBD entry with appropriate C code. You must NOT alter any of the existing lines. You are only allowed to replace each TBD line with new lines. Each of the C programs do exactly the same task. Given a list of numbers on the command line, they find the sum, sum of squares and the sum of cubes. You do not have to add error checking. You can safely assume that all numbers are given nicely as integers on the command line and are in the range of -100 to 100.// gcc -Wall sum6.c -o sum6 // ./sum6 4 8 -5 0 20
// prints: Sum=27 Sum2=505 Sum3=8451
#include
#include
static void sum6(int argc, char *argv[], int *x, int *y, int *z) {
TBD
}
int main(int argc, char *argv[]) {
int x, y, z;
TBD
printf("Sum=%d Sum2=%d Sum3=%d\n", x, y, z);
return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
What are "open-loop" and "closed-loop" systems
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
You know the right answer?
You have been given 8 C files, each has the same logic, expressed in different ways. Each of the fil...
Questions
question
Mathematics, 01.06.2021 16:10
question
Spanish, 01.06.2021 16:10
question
Mathematics, 01.06.2021 16:10
question
Arts, 01.06.2021 16:10
question
Mathematics, 01.06.2021 16:10
question
Mathematics, 01.06.2021 16:10
question
Mathematics, 01.06.2021 16:10
Questions on the website: 13722363