Exercise 14: Write a program that assigns the value 50000 to an integer variable x, assigns the value of x*x to an integer variable y, and then prints out the value of y. Did you get a strange answer? If so, explain why.

Yes, I got a strange result x*x = 50000*50000 = 2500000000 but the maximum value an integer can store is 2147483647. so, we can't store 2500000000 inside an integer. that's the reason for a strange answer.
Exercise 14: Write a program that assigns the value 50000 to an integer variable x, assigns...
Q.5. (a) Write a program/ pseudo-code with following specs. The program contains an integer variable x initialized with value 20. After initializing x the program creates 07 processes using fork(). Each parent adds 10 to x and prints x. (15)
Please use python to write the simple program.
Exercise 2 - Summation Write a program to accept integer inputs until the user inputs a non-integer. Then, the program prints the summation of the inputted numbers. Hint: Use the function input() to get the user input. Use a variable total for calculating the summation. Need to use while loop for the repeated inputs. Use if statement with isdigit() function to check whether the user input is an integer or not. if...
Explain the code: Exercise 22: Write a program that creates three random double variables a, b, and c and assigns them values between 0 and 1 using the Math.random( ) method mentioned in the preceding exercise. It then does all of the following: It prints out the three values. It prints "All are tiny" if all three values are less than 0.5. It prints out "One is tiny" if exactly one of the three values is less than 0.5. It...
Write a complete program thatdeclares an integer variable,reads a value from the keyboard into that variable, andwrites to standard output the square of the variable's value.
Write a Python program to prompt the user for an integer number. Assign this integer to a variable X. Then assign a variable Y to the X**3 (X to the power 3). Finally, assign the variable Z to the square root of Y and print the values of X, Y, and Z as shown in the example below. Use main() function to define and call the program. Example: Enter an integer number: 3 X = 3 if Y=X**3 then Y...
Write a program that prints every integer value from 1 to 20 along with the squared value of each integer.
Exercise 22: Write a program that creates three random double variables a, b, and c and assigns them values between 0 and 1 using the Math.random( ) method mentioned in the preceding exercise. It then does all of the following: It prints out the three values. It prints "All are tiny" if all three values are less than 0.5. Extra: It prints out "One is tiny" if exactly one of the three values is less than 0.5. Extra: It prints...
Write a C program that has a local and a global variable. The program uses a fork to create a child process. The parent process modifies both variables to be 10 and 20 and prints out the values. Then the child process modifies both variables to be 100 and 200 and prints out the values? Explain the program output?
1) Write a program that: program starts; declares and initializes to zero an integer variable score; declares and initializes to zero a float variable total; uses a for loop statement with integer x initialized to 1 going 5 iterations hence x<5 incremented by 0; input from keyboard integer score in range of 0 to 99; print on new line input value; adds score to total; switch x equals 3 break default x++; after exiting the loop calculate the average score;...
Please answer this python questions.Thank you! Question Two Write a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, and then show the total pay at the end...