Source Code :
#include<bits/stdc++.h>
#define pi 3.1415
using namespace std;
int main()
{ int ch , ch1 ;
double x ;
cout <<"1. sin(x) "<<endl<<"2.
cos(x) "<<endl<<"3. tan(x) "<<endl<<"4.
asin(x) "<<endl<<"5. acos(x)"<<endl<<"6.
atan(x)"<<endl<<"Enter Your Choice "<<endl;
cin >> ch;
cout << " 1.Degree
2.Radian"<<endl<<" Enter Your Choice
"<<endl; // Enter degree or radian.
cin >> ch1;
if(ch1==2)
{
cout << "Enter
Radian: ";
cin>>x;
}
else
{
double var;
cout << "Enter
Degree: ";
cin>>var;
x = (var * (pi / 180
));
}
switch(ch)
{
case 1: cout <<
"sin value of x="<<x<<" is: "<<sin(x);
cout<<"\n";
break;
case 2: cout <<
"cos value of x="<<x<<" is: "<<cos(x);
cout<<"\n";
break;
case 3: cout <<
"tan value of x="<<x<<" is: "<<tan(x);
cout<<"\n";
break;
case 4: cout <<
"asin value of x="<<x<<" is: "<<asin(x);
cout<<"\n";
break;
case 5: cout <<
"acos value of x="<<x<<" is: "<<acos(x);
cout<<"\n";
break;
case 6: cout <<
"atan value of x="<<x<<" is: "<<atan(x);
cout<<"\n";
break;
default: cout<<"
Please Enter Valid Choice:";
cout<<"\n";
break;
}
}
OutPut:
Please make program. Don't use cstdlib, iosstream, cmath, math.h I didn't learn about it. Only use...
Description Write C++ code that correctly input and output information. (Moving data to and from the screen and to and from text files. Also inputting predefined functions, etc., from included libraries.) Problem Description Consider a data file that has geometrical angle values in degrees. Angle values may be on one line, several lines, or any other white space separated format. Fig. 1 below shows one possible format, but other formats are possible. 12.9 100.8 270.5 300.6 120.8 There are no...
Hi, this is an intro to C Programming Class. Please do not use
arrays, functions, math.h, or struct to store any data except to
declare strings char strVar[20].
Furthermore, can you please do a good check to make sure the
final program does not have any problems because when I copy and
paste them the app I use says there are some problems and it won't
run the program. So if you can double check to make sure that
everything...
Hi. Could you help me write the below program? Please don't use any header other than iostream, no Chegg class, no argc/argv. Nothing too advanced. Thank you! For this assignment you are implement a program that can be used to compute the variance and standard deviation of a set of values. In addition your solution should use the functions specified below that you must also implement. These functions should be used wherever appropriate in your solution. With the exception of...
please help!
Write a program that can be used as a math tutor for a young student. The program should display two random numbers to be added. The program should then pause while the student works on the problem. When the student is ready to check the answer, he or she can press a key and the program will display the correct solution. The output must be formatted correctly with the numbers aligned properly. You will build on this assignment...
Write VBA functions to calculate sin (x) using the Maclaurin arcsine series, and compare the values for sin-1(x) from your program to those given by the Excel spreadsheet function ASIN(x). The Maclaurin arcsine expansion is given by x 3x 6 40 (2n)! sin1(x)-2((2n+1) Note: This function by definition is only defined for-1 SxS1. When you write the code for calculating it, you will need to include code that assigns a value to it that reflects it is undefined for values...
C Language program. Please follow the instructions given. Must use functions, pointers, and File I/O. Thank you. Use the given function to create the program shown in the sample run. Your program should find the name of the file that is always given after the word filename (see the command line in the sample run), open the file and print to screen the contents. The type of info held in the file is noted by the word after the filename:...
program in C. please paste code, thanks!
CS 153 Program 4 - Stirling Approximation (separate compilation) 1. Write a pure function double factoriallint Ni that computes N! N 1023°4 ... N-1)'N Do this the obvious way by initializing a product to one and then multiplying the integers together using a loop. Zero factorial is defined to be one. Now write a pure function double atining in Ni that uses the Stirling approximation to compute: approx[e!) - V22) In this formula,...
In C++ please! Please include .cpp and .hpp files! Thank you! Recursive Functions Goals Create and use recursive functions In this lab, we will write a program that uses three recursive functions. Requirements: Important: You must use the array for this lab, no vectors allowed. First Recursive Function Write a function that recursively prints a string in reverse. The function has ONLY one parameter of type string. It prints the reversed character to the screen followed by a newline character....
Please help with part A. Thank you!
(4%) Problem 18: A point charge of 5.3 pC is placed at the origin (x1-0) of a coordinate system, and another charge of-1.8 μ C is placed placed on thex-axis at x2 0.21 m 50% Part (a) Where on the x-axis can a third charge be placed in meters so that the net force on it is zero? Grade Summary Deductions Potential 0% 100% tanO HOME sin cos Submissions Attempts remaining: 6 (0%...
Use C programming
Make sure everything works well only upload
Write a program that takes an integer from standard input and prints all prime numbers that are smaller than it to standard output. Recall that a prime number is a natural number greater than 1 whose only positive divisors are 1 and itself. At the start of the program, prompt the user to input a number by printing "Input a number greater than 2:\n". If the user's input is less...