Complete the declaration and initialization of the array variable with datatype character, char array[ ]=???;. Initialized the first index with A, the second index with T, the third index E, the fourth index N, the fifth index as E, and the sixth index as O.
Your answer's format should be a complete declaration at the same time initialization:
format: datatype array_name[ ]=???;
Answer:
The work formula measures the multiplication of magnitude of displacement (d), the component of the
orce (F), and the angle (8) between d and F. It can be obtained from the following expression:
W = F x d x cos(0).
Write a program which prompts the user to enter d, F, and 0. Then, calculates W and displays
the computed value for W on the screen. (Notice: You should include all steps and respect the
Python syntax in order to obtain full mark).
• Which Python built-in functions did you use to write this program?
• Which modules in Python did you import? Which functions from the imported modules are
applied in your program?
1. Create a menu to execute tasks. There shall be n tasks in total, update as they comes up. You should properly prompt wherever necessary.
Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:
int getCube(int number){ return number * number * number;}
char getLetter(double n) {if(n>50) {return'0';} return 'X'}
double getThis(int num){return 1.0;}
int main(){
int n1 = 10, n2 = 123;
double vall = 123.45, val2 = 456.234;
cout << getCube(10) << " " << getCube(123) << "\n";
cout << getLetter(val2) << "-" << getLetter(val1);
cout << getLetter(34.23) << "--" << getThis(88);
cout << getThis(val1);
return 0;
}
What is the Answer? :
Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:
int getCube(int number){ return number * number * number;}
char getLetter(double n) {if(n>50) {return'0';} return 'X'}
double getThis(int num){return 1.0;}
int main(){
int n1 = 78, n2 = 55;
double vall = 123.56, val2 = 784.59;
cout << getLetter(val1) << "-" << getLetter(val1);
cout << getLetter(val2) << "--" << getThis(val2);
cout << getCube(123) " " << getCube(321) << "\n";
cout << getThis(val1);
return 0;
}
What is Answer:
1. Write C++ statements that prompt the user to enter a person’s last name and then store the last name into the variable name.
1. Create a new project with following particulars
1. name the project title in the following format “ID_section_lab#” e.g., “f2019065111_w1_lab2”.
2. Create a menu to execute tasks. There shall be n tasks in total, update as they comes up. You should properly prompt wherever necessary. A sample menu is shown below.
1. Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallon the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling.
Write a Java class Complex for dealing with complex number. Your class must have the following features:
o Having no parameter – for setting values to zero or null.
o Having two parameters for assigning values to both data members.
o Overload the above constructor and use this keyword to set the values of data members