Program the following. Implement the following equation 3x4 sin(180x) + 4x3 cos(90x) + x2 sin(tan(45)) + 7x + 9cos(90x2 ) where x may be user defined value.
You will be tasked to write this program in either C++ or Java, whichever you feel more comfortable with.
The goal is for the program to be able to guess the user's political party before they reach the end of the survey. This will require your program to gather a substantial amount of data before it can make accurate guesses. In particular:
2. The last question should ask which political party they affiliate with. This way you will be able to gather and store data corresponding to the results you acquire. Create at least 4 political party storage.
Write a program to create a class “student” that stores name and roll number of a student. Create another class “marks” that stores three subject marks. Print the details of two students along with average mark by using
i)A common friend function to both the classes
ii)Making a member function of
ii)Making a member function of “student” class as friendly to “marks” class.
Create two classes which stores distance in feet, inches and meter, centimeter format respectively. Write a function which compares distance in object of these classes and displays the larger one.
In math notation, leading zeros are OK, as in 02. What happens if you try this in Python and why
Design a program using Java NetBeans (Console application). With the following enum class: public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } Create a second class called enumDayMood with a void method call telDayMood (). This method contain a switch case as follows
Number Diamond
Given an integer N as input, write a program to print a number diamond of 2*N -1 rows as shown below.
Note: There is a space after each number.
Input
The first line of input is an integer N.
Explanation
In the given example, the number of rows in the diamond is
5.So, the output should be
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Sample Input 1
5
Sample Output 1
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Sample Input 2
4
Sample Output 2
1
1 2
1 2 3
1 2 3 4
1 2 3
1 2
1
Indivisible Numbers
You are given a positive integer N. Your task is to find the number of positive integers K <= N such that K is not divisible by any of the following numbers 2, 3, 4, 5, 6, 7, 8, 9, 10.
Input
The first line of input is an integer N.
Output
The output should be an integer representing the number of positive integers satisfying the above condition.
In the given example,
11 is not divisible by any number from 2 to 10. It is divisible by only 1, 11.So, the output should be
2.
Sample Input 1
11
Sample Output 1
2
Sample Input 2
12
Sample Output 2
2
Sample Input 3
200
Sample Output 3
47
Sample Input 4
10
Sample Output 4
1