Expert answer:please see the attachment in order to know what are the requirements. you should work on the C program, all what you have to do is to type the requirements in the C program , they are really easy
geng102_assgn_14.pdf
ece102_17fall_assgn_15.pdf
Unformatted Attachment Preview
GENG 102
Assignment #14
Sorting numbers
Write a program that prompts the user for 3 numbers and a character. The program will
display the three numbers either in the ascending or descending order depending on
the character input. If the character is A, the three values should be printed out in the
ascending order. If the character is D, in the descending order.
For example, if the three numbers are 1, -4, 5 and the character input is A, then the
program should output the following:
The three numbers in the ascending order are -4, 1, and 5.
If the character input is D, then the program should output the following:
The three numbers in the descending order are 5, 1, and -4.
Pre-lab assignment
1. Write down the first three steps of problem solving.
2. Write down the detailed pseudocode. Remember to include error checking.
ECE102
Assignment #15
1. Trace the following loop. After you have traced the loop, write down the
complete and exact output that will be shown on the command window. Pay
attention to the %4d and %4c in the printf commands.
int a = 1, b = 1, counter = 1;
int c;
printf(“%4c%4c%4cn’”, ‘a’, ‘b’, ‘c’); /*notice the single
quotes?*/
while (counter <=7)
{
c = a+b;
printf(“%4d%4d%4dn”, a, b, c);
a = b;
b = c;
}
2. Trace the following loop. After you have traced the loop, write down the
complete output that will be shown on the command window.
int N = 6;
int nfactorial = 1, k;
k = N;
while (k>= 1)
{
nfactorial = nfactorial *k;
k–;
}
printf(“%d! = %dn”, N, nfactorial);
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more