Declare an int constant minutesPerHour whose value is 60
Q: int and float are examples of
A: Question. int and float are examples of
Q: int i = 10; int j = 4; int k = i / j; int l = j % i; What is k and l?
A: k= i/j which is 10/4 will give the quotient i.e 2 I=j%i which is 4%10 will give the remainder i.e 0
Q: A mathematician and discovered a number which have unique properties. As he is not decided any name…
A: START Declare a variable 'num' and store the input value inside it. Declare a 'sum' variable to…
Q: Print the given statement 10 times in F95. "Fortan is tough programming language."
A: The given statement can be printed 10 times using 'do' loop. Inside the loop body write the print…
Q: z = int('10') what is the value of z?
A: Answer:z = int('10') Now the value of z is in x = 10;
Q: Exercise GradesStatistics (Method): Write a program called GradesStatistics, which reads in n grades…
A: Purpose of the program: This program asks the user to insert grades of multiple subjects into an…
Q: What's wrong with this code? float q;int *p;q = 100.7;p = &q;
A: The objective of the question is to identify the error in the given piece of code.
Q: Write a program that prompts for an integer (that a side length) and displays, using asterisks, a…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: this code needs to take in an unsigned int. can you add it please
A: Dear Student, To take an input of unsigned int you need to intialize using unsigned int and should…
Q: C Program to Find the Size of int, float, double and char .the size will be in btyes.
A: Use SizeOf() Operator for finding the size occupied by data types. Question :
Q: Declare a two-dimensional array which can be used to store a yearly budget. Each row of the array…
A: A C++ program for the given criteria with “3” budgeted items is as follows, File name: “main.cpp”…
Q: int x-10; void func1() printf("x-*d\n", x); return; 10 } 11 12 13 int func2(int a, int b) 14 ( 15 16…
A: The code given: #include<stdio.h> int x = 10; void func1(){ printf("X=%d\n", x);…
Q: Suppose that the first element of e is stored at location D600, j is stored at location D664 and an…
A: As per guidelines, we are supposed to answer only three subparts. Kindly repost other parts as a…
Q: int isbivisiblebye(int num) (m ) reture isDivisibleBy6( ); num eturn 13 10) return reture…
A: #include <stdio.h> int isDivisibleBy6(int num){ if(num < 6) return…
Q: What occurs when you multiply ptr by 4? Assuming that ptr is a reference to an int, what happens
A: If we multiply ptr by 4 that what will happen , ptr is a reference to an integer.
Q: ython Code Only: One day, Fred and his N friends were playing a card game in which each player…
A: Input/Output Explanation: An integer N denoting the number of cards(1<=N<=500) An integer…
Q: Int cube ( int x) { // returns cube of x : return x.x.x. ;}* False True
A: your question is about True false let's solve the question
Q: Write the following function to display three numbers in increasing order:def…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: 3. int x =9 ; display the address of the variable x? Answer:
A: Step-1: Start Step-2: Declare a variable x with value 9 Step-3: Print address of x Step-4: Stop
Q: Write an application that plays the game of Fermi. Generate three distinct random digits between 0…
A: def play(nrounds, ndice=2): player_capital = computer_capital = nrounds for i in range(nrounds):…
Q: QUESTION 18 Int xt 200, int yt 100 Int dt, d2 mov EAX, x1: mov EBX, yt: push EBX pop ECX mov d2, ECX…
A: The register EAX,EBX,ECX are data register ,it is used to store the value . The answer is 18)100…
Q: Write a function in Java that implements the following logic: Given a number n, return true if n is…
A: I have provided JAVA CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT---------
Q: int a=10, b=15; test (b,a); test (a,b); cout<<a <<b<<endl; int test (int &x, int y) { x=66; y=44;}
A: Here &x denotes that first parameter is passed as reference and y means its passed by value. In…
Q: int x1 = 66; int y1 = 39; int d; _asm { } mov EAX, x1; mov EBX, y1; push EAX; push EBX; pop ECX mov…
A: Here we have given a code fragment in assembly language, our task is to find the value of d in…
Q: What happens when you increase the number ptr by four? Assuming that ptr is a reference to an int,…
A: Memory addresses may be stored in a pointer variable. There are a number of different ways in which…
Q: By default, all integer types are implicitly cast as: O uint O sint O ushort O long
A: Integers are the whole numbers which are of size 4 bytes generally. There are different types of…
Q: int main(int argc, char **argv) { float *rainfall; float rain_today; // rainfall has been…
A: Here is the answer:-
Q: One day, Fred and his N friends were playing a card game in which each player throws a cardwith a…
A: Input/Output Explanation: An integer N denoting the number of cards(1<=N<=500) An integer…
Q: var today var tomorrow today = 11; 12; tomorrow What will be stored in tomorrow after the code is…
A: As per the given problem we have to find what will be stored in tomorrow after the code will run.
Declare an int constant minutesPerHour whose value is 60
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- OOP JAVA• • Asks the user for their name and store it in an array Asks the user for their age and store it in a variable Determines how many years before they can retire at age 67. If user is 67 then it will indicate that the user should retire now. If user is over 67 it will indicate that the user should have already retired If the user is under 67 then it will indicate number of years before retirement Ends with a thank you message. Example of Output Welcome to nameage Please enter name: (user enters a value like Pat) Please enter your age: (user enters a value like 69) Hi Pat. You should already be retired. Thank you for using nameage. Bye!This is need in Java Declare an array named temperatures that can hold 10 doubles.
- #include int main() { float Bread = 1.09, Water = 2.18, Banana = 1.00, Meat = 7.99; //Unit for bread is loaf, for water is bottle, for banana and meat are Ibs. int Bread_num=2, Water_num=3, Banana_num=2, Meat_num = 1; float Cost = Bread"Bread_num+Water*Water_num+Banana*Banana_num+Meat"Meat_num; float Grocery_tax = 0.07; Other part of this line is missing. Other part of this line is missing as well. [printf( [printf( getchar(); return O; } -----=-SCRIPT ENDS HERE ==== so we can have You have 2 loaves of bread, 3 bottles of water, 2 lbs of Banana, and 1 lbs of Meat. It is 18.71 before tax but you need to pay extra 1.31 for tax. as the output when we run it! Just type in two line, please! (You do not have to type in the whole script!)Exercise GradesStatistics (Method): Write a program called GradesStatistics, which reads in n grades (of int between 0 and 100, inclusive) and displays the average, minimum, maximum, median and standard deviation. Display the floating-point values upto 2 decimal places. Your output shall look like:Enter the number of students: 4Enter the grade for student 1: 50Enter the grade for student 2: 51Enter the grade for student 3: 56Enter the grade for student 4: 53{50,51,56,53}The average is: 52.50The median is: 52.00The minimum is: 50The maximum is: 56The standard deviation is: 2.29The formula for calculating standard deviation is:Hints:public class GradesStatistics {public static int[] grades; // Declare an int[], to be allocated later.// This array is accessible by all the methods.public static void main(String[] args) {readGrades(); // Read and save the inputs in int[] gradesprintArray(grades);System.out.println("The average is " + average(grades));System.out.println("The median is " +…3. Factorials/MathUtils File Factorials.java contains a program that calls the factorial method of the MathUtils class to compute the factorials of integers entered by the user. Save these files to your directory and study the code in both, then compile and run Factorials to see how it works. Try several positive integers, then try a negative number. You should find that it works for small positive integers (values < 17), but that it returns a large negative value for larger integers and that it always returns 1 for negative integers.Returning 1 as the factorial of any negative integer is not correct—mathematically, the factorial function is not defined for negative integers. To correct this, you could modify your factorial method to check if the argument is negative, but then what? The method must return a value, and even if it prints an error message, whatever value is returned could be misconstrued. Instead it should throw an exception indicating that something went wrong so it…
- Selective Sum Code in C languageJava Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write down the name of each piece of jewelry and its price. Create a function that gets the name of the piece of jewelry with the highest price and returns "The most expensive one is the name of jewelry piece}". Examples mostExpensive ({ "Diamond Earrings": 980, "Gold Watch": 250, "Pearl Necklace":4650 })→ "The most expensive one is the Pearl Necklace"In the array declaration 'i' denotes that integer values will be stored in the variables. Select one: O True O False
- z = int('10') what is the value of z?previous chapters, you continued to modify the MarshallsRevenue program. Now, modify the program so that the major functions appear in the following individual methods: GetMonth - This method prompts for and returns the month GetNumMurals - This method prompts for and returns the number of murals scheduled and is called twice -- once for interior murals and once for exterior murals ComputeRevenue - This method accepts the number of interior and exterior murals scheduled, accepts the month they are scheduled, displays the interior and exterior prices, and then returns the total expected revenue DataEntry - This method fills an array with customer names and mural codes and is called twice -- once to fill the array of interior murals and once to fill the array of exterior murals GetSelectedMurals - This method continuously prompts for mural codes and displays jobs of the corresponding type until a sentinel value is entered. using System; using static System.Console; using…Complete the function ConvertToDecadesAnd Years to convert totalYears to decades and years. Return decades and years using the ElapsedDecades Years struct. Ex: 26 years is 2 decades and 6 years. 1 #include 2 3 typedef struct ElapsedDecadesYears_struct { int decadesVal;` 5 int yearsVal; 6) ElapsedDecadesYears; 7 8 Elapsed Decades Years ConvertToDecadesAndYears(int totalYears) { ElapsedDecades Years tempVal; /* Your code goes here */ 15 int main(void) { 8722878 25 26 } ElapsedDecadesYears elapsedYears; int totalYears; scanf("%d", &totalYears); elapsedYears = ConvertToDecadesAndYears (totalYears); printf("%d decades and %d years\n", elapsedYears.decadesVal, elapsedYears.yearsVal); return 0;