Question: Need help with this assignment Mostly C programming 2%2Fmod-resource%2Fcontent%2F2%2Fa 1 .pdf your C program as problb.e e) Once your program works correetly, make a copy

 Need help with this assignment Mostly C programming 2%2Fmod-resource%2Fcontent%2F2%2Fa 1 .pdf

Need help with this assignment Mostly C

Need help with this assignment Mostly C programming

2%2Fmod-resource%2Fcontent%2F2%2Fa 1 .pdf your C program as problb.e e) Once your program works correetly, make a copy of it and rename the copy to problc.c. Change this copy to detect and report the following error: Error Handling: Print an error message if the input contains values other than 0, 1 and In. Make sure you modify your algorithm appropriately first, then implement your changes compile, test, and debug until your program works correctly Problem 2: Consider the following problem deseription, inputioutput specification, and high level pseudo-code algorithm Problem Description: An integer is said to be prime if it is divisible only by 1 or itself. For example, 2. 3, 5 and 7 are prime, but 4. 6. 8, and 9 are not. Input: a number that is greater than 2 Output A message indicating the number entered by the user is prime or not. Error Handling: None. High-level pseudo-code algorithm Step I. Assign variable isPrime the value true Step 2. Get the input from the user and assign it to variable oneNumber Step 3. Assign value 2 to variable count Step 4, while count is less than or equal tovonemben t land isPrime is true 4.1, if oneNumber can be divided by count then 4.1.1: Assign sPrime the value false else 412 Inunease count by Step $ Output the testing Note: When you translate the poeudo code above inco "icade, you should try to ust named constant e deaote the hteral Nalues try te maecour preram mors interacune by prompungtese ror soputs and label the ouput UPO use proper mdpatation ind spacing amescondenui 3401 92%2Fmod-resource%2Fcontent%2F2%2Fa1.pdf Part 2: Develop and write an algorithm to solve the problem given below Represent your algorithm using pseudo-code (similar to those given above). This means to use simple English sentences to describe your algorithms accurately and explicitly. Be certain to only use concepts that have been introduced in class: sequencing, choice and repetition. DO NOT code your algorithm in C. Instead, use a word processor to type your algorithm. Problem: Given two pairs of integer values representing two dates in the form of month, year, determine which date is more recent. For example, if the two pairs of values are (12, 1996) and (10, 1991). then the program should output the first pair (12 1996) is more recent Hand in: Upload the two source programs (.c files) that your finished for part land the type-written version of your solution for part 2 to moodle before or on the designated time. Late assignments will get heavy penalty, so please do submit your assignments on time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!