Answer:
Following are the program in the C++ Programming Language.
//header file
#include<iostream>
//header file
#include <bits/stdc++.h>
//namespace
using namespace std;
//set main function
int main()
{
//set float type variables
float a,s,m,d,c,b,g;
//print message and get variable from the user
cout<<" Enter The First Number : ";
cin>>c;
//print message and get variable from the user
cout<<" Enter The Second Number: ";
cin>>b;
again:
//get variable from the user for Operation
cout<<" Enter the Operation which you want : ";
char choice;
cin>>choice;
//Addition
a=c+b;
//Subtraction
s=c-b;
//Multiplication
m=c*b;
//Division
d=c/b;
//Modulus
g=fmod(c, b);
//set switch statement
//here is the solution
switch(choice)
{
case '+':
cout<<"Addition: "<<a<<endl;
goto again;
break;
case '-':
cout<<"Subtraction: "<<s<<endl;
goto again;
break;
case '*':
cout<<"Multiplication: "<<m<<endl;
goto again;
break;
case '/':
cout<<"Division: "<<d<<endl;
goto again;
break;
case '%':
cout<<"Modulus: "<<g<<endl;
goto again;
break;
default:
cout<<"Exit";
break;
}
return 0;
}Explanation:
Here, we define the required header files then, we set main function.
Answer: the answer is 1
Explanation:
edge 2021
Ooh, very tough question. I've played both Celeste, and Hollow knight. So I cant say anything for the other two games.
Celeste and Hollow Knight are both platforming games, so that was something I was interested in. And both also have deep morals to learn and stories to enjoy. Celeste basically follows Madeline, who's had some emotional problems in the past as she's trying to climb a mountain. In this mountain, a part of her escapes and becomes a but of a antag.
I loved the background, and the characters in this game. But there were a lot of parts in the game that frustrated me and I got very close to just all-out giving up on the game. I still loved it though.
But don't even get me started on Hollow Knight. LIKE OH My GOD, I am obsessed with Hollow Knight and its beauty! I have almost every piece of merchandise, every plush, every t-shirt, charm, sticker, pins, and all the DLC packs. This game is an absolute masterpiece. I cant say anything without giving off the background and lore behind the game. and I'll be honest, there's been a couple of times where I was so touched with the game, that I just started crying. There's lovable characters like Hornet, our little Ghost, Myla (oml rip Myla you beautiful baby), and of course laughable Zote. Its so beautiful. The art is stunning, the animation is so clean. And if you do end up getting Hollow Knight, then your going to be even more excited because Team Cherry is actually in the works of creating the sequel (or prequel) of Hollow Knight, which is Hollow Knight ; Silksong! Definitely go and watch the Nintendo trailer for that game! I've been so excited about it for months and Ive been watching the trailer almost every day.
Anyway, sorry this is so long. But i'm going to go with my gut and say Hollow Knight. Its beautiful, amazing, and overall just..perfect.
Answer:
hollow knight is pretty good
Explanation:
You need to store the GPS coordinates of the hospitals in a state in order to find the nearest hospital for ambulance helicopters.
You write a loop to save anywhere from 10 to 100 values from a user. You will pass the collection to a function to find the average.
Answer:
Deque: You need to keep a record of the ages of the last 50 customers visit a restaurant. As new customers come in you delete the age that has been in the list the longest.
Tuple: You need to store the GPS coordinates of the hospitals in a state in order to find the nearest hospital for ambulance helicopters.
List: You write a loop to save anywhere from 10 to 100 values from a user. You will pass the collection to a function to find the average.
Explanation: Just got the results back no thanks to the guy above
Answer:
import java.util.Arrays;
public class sort{
public static void main(String []args){
int[] arr = {2,6,9,1,5,3};
int n = arr.length;
Arrays.sort(arr);
for(int i=0;i<n;i++){
System.out.println(arr[i]);
}
}
}
Explanation:
first import the library Arrays for using inbuilt functions.
create the main function and define the array with elements.
then, use the inbuilt sort function in java which sort the array in ascending order.
syntax:
Arrays.sort(array_name);
then, use for loop for printing the each sorting element on the screen.
Ex: If the input is:
Enter the number of integers in your list: 5
Enter the 5 integers:
50
60
140
200
75
Enter the threshold value: 100
the output is:
The integers that are less than or equal to 100 are:
50
60
75
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. Such functionality is common on sites like Amazon, where a user can filter results. Your code must define and call the following two functions: def get_user_values() def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold) Utilizing functions will help to make your main very clean and intuitive.
Answer:
def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):
for value in user_values:
if value < upper_threshold:
print(value)
def get_user_values():
n = int(input())
lst = []
for i in range(n):
lst.append(int(input()))
return lst
if __name__ == '__main__':
userValues = get_user_values()
upperThreshold = int(input())
output_ints_less_than_or_equal_to_threshold(userValues, upperThreshold)
Explanation:
Answer:
39
Explanation:
Since each of the address occupies only 1 memory cell and the 2-D array is row-major 2-D array.So the elements will be filled row wise.First the first row will be fully filled after that second row and so on.Since we want the address of the element at third row and fourth column.
we can generalize this :
address of the element at ith row and jth column=s + ( c * ( i - 1 ) + ( j - 1 ) ).
s=Starting address.
c=Number of columns in the 2-D array.
address=20+(8*(3-1)+(4-1))
=20+(8*2+3)
=20+16+3
=39
Or you can make a matrix of six rows and eight columns and put first cell with 20.Start filling the elements row wise one by one and look what is the count of 3rd row and 4th column.