Computer Programming Lab #1 Solved

$24.99 $18.99

Use the template .c file and write a program that performs following tasks respectively. These two tasks should be distinct functions and called from main() function. Once they been called, each will call another function to make the calculation for the related task. Do not use any library except stdio.h. Stick to the template file,…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:

Description

5/5 – (2 votes)

Use the template .c file and write a program that performs following tasks respectively. These two tasks should be distinct functions and called from main() function. Once they been called, each will call another function to make the calculation for the related task. Do not use any library except stdio.h. Stick to the template file, do not write extra functions.

  1. The program takes the side lengths of a right triangle as input and calculate the 3 trigonometric functions below for an angle. Note that the inputs should be integers.

sin x =

cosx =

tan x =

Example:

  1. 3

  1. 4

  1. 5

sinx = 0.6

cosx = 0.8

tanx = 0.75

  1. The program asks user to enter their age and then print it in seconds. Make sure that your program is able to make a calculation for an input of 0-100 age.

Example:

Your age: 25

You are 788400000 seconds

Computer Programming Lab #1 Solved
$24.99 $18.99