Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MUST be in C programming LAB #2: For problems 1-7 design an algorithm; implement a C program and run on your PC! Lab p-1) Find

MUST be in C programming

image text in transcribedimage text in transcribed

LAB #2: For problems 1-7 design an algorithm; implement a C program and run on your PC! Lab p-1) Find the largest value of the given two integers. Lab p-2) Find the largest value of the given two integers using conditional operator. Lab p-3) Write a program on following algorithm: Algorithm: Enter a grade; Print A if exam grade is >= to 90 Print B if exam grade is >= to 80 Print Cif exam grade is >= to 70 Print Dif exam grade is >= to 60 Print F for all other grades. Labp-4) Write a program that reads three nonzero float values and determines and prints if they could represent the sides of a triangle. Theorem: The sum of the lengths of any two sides of a triangle must be greater than the third side. C+B>A A+C>B B+A>C Lab p-5) Write a program that reads a four-digit number and finds the sum of the individual digits. Exp 5234 -> 5+2+3+4 = 14 Lab p-6) Write a C program that inputs four different integers from keyboard, and then print the sum, the average, and the product and integer division of each pair. (Pair 1 is 384 and pair 2 is 5&6 according to below example). Use if statement and the 35 4' 6 screen dialogue should appear as follows: Example: the integers are sequentially ordered as: 3,4,5,6 Pair 1 Pair 2 Format required on screen: Please input four integers: Sum is: Average is: Product: First and second pair divisions are: Lab p-7) Write a c program that will check if a given number by the user is "Prime Number or "Not Prime Number". (use while loop in programming) Example Output: Enter Number: 23 Prime Number Example Output: Enter Number: 24 Not Prime Number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

14. Let X be uniform over (0, 1). Find E[X|X < 1 2 ].

Answered: 1 week ago