Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . Write a C program to determine the distance between two given points. According to the Pythagorean theorem, the distance between two points, denoted

3. Write a C program to determine the distance between two given points.
According to the Pythagorean theorem, the distance between two points, denoted as (x1,y1) and (x2,y2, can be calculated as the "square root of the sum of the squares of the differences in their respective x and y coordinates".
Theformula is :
d=(x2-x1)2+(y2-y1)22
Again, use the sqrt() function to calculate the square root of the number.
Submission: submit c file
4.The date June 10,1960, is special because when we write it in the following format, the month times the day equals the year.
610?60
Write a program that asks the user to enter a date in mm/dd/yy format. (two-digit year is required). The program should separate mm, dd, and yy into the variable month, date, and year. The program should then determine whether the month times the date is equal to the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.
Submission: submit c file
5. Scientists measure an object's mass in kilograms and its weight in newtons. If you know the amount of mass that an object has, you can calculate its weight in newtons with the following formula:
Weight = mass 9.8
Write a program that asks the user to enter an object's mass, then calculates anddisplays its weight. If the object weighs more than 1,000 newtons, display a message indicating it is too heavy. If the object weighs less than 10 newtons, display a message indicating that the object is too light.
image text in transcribed

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago