Answer:
#include<iostream>
using namespace std;
/* main is a function without a parameters which returns an int value*/
int main( )
{
/* declare int data type for numeric values initialize candyBar and gumBall */
int coupons, cabdyBr=10,gumall=3;
int candyBarAmount,gumBallAmount,remainder;
/* cout is used to show the message to user cin to read user input from keyboard and sets the value to coupon */
cout<<"Enter the number of coupons"\t";
cin>>coupons;
/* First check coupons with cabdyBar */
if (coupons >= candyBar)
{
candyBarAmount=coupons/candyBar;
remainder=coupons-(candyBarAmount*10);
}
else
{
candyBarAmount=0;
}
/* check remaining value with gumBall */
if (remainder<<candyBar && remainder>=gumBall)
{
gumBallAmount=remainder/gumball;
}
else
{
gumBallAmount=0;
}
/* show thw required output to the user */
cout<<"The number of Candy bars is "<< candyBarAmount <<endl;
cout<<"The number of gumballs is "<<gumballAmount <<endl;
/* The program ends and return 0 as the functions value */
return 0;
}
OUTPUT
Enter the number of coupons: 23
The number of candy bars = 2
The number of gumballs = 1
The point-of-view of a game is influenced by the player role and game camera. Give an example of a game that uses omniscient player role. Explain what the game camera perspective looks like for that game and how that camera perspective assists in the omniscient immersive experience.
Answer:
REWORD
Explanation:
Having choices within a game gives the player a certain amount of control over the game,and can keep them immersed. When a choice is “meaningful” it is so because what you decide will have different outcomes, one such example being the game(s) Skyrim or Fallout 4. With these games, you are presented a multitude of choices, mainly within dialogue, and depending on how you choose to react, you can gain certain quests,.
What code would you use to tell if "schwifty" is of type String?
a. "schwifty".getClass().getSimpleName() == "String"
"b. schwifty".getType().equals("String")
c. "schwifty".getType() == String
d. "schwifty" instanceof String
Answer:
d. "schwifty" instanceof String
Explanation:
Given
List of options
Required
Determine which answers the question.
The syntax to check an object type in Java is:
[variable/value] instanceof [variable-type]
Comparing this syntax to the list of options;
Option d. "schwifty" instanceof String matches the syntax
Hence;
Option d answers the question
What are the differences between an Api Controller and "regular/view" Controller in .Net?
Answer:
An API controller in .Net is a code statement or function that returns data and a RESTful API to the application while a regular or view controller is a class that returns a view.
Explanation:
The .Net framework is a platform used for creating user-friendly and user interactive interfaces in desktop and web applications. Like all programming frameworks, it uses API and API controllers to source data and other properties.
Input a double and print the first two digits after the decimal point with a space between them. Sample run: Please input a decimal number: 57.8934 Answer: 8 9 Hint - to complete the second coding activity in lesson 5 you had to learn how to get individual digits from an int value. You can reuse this method once you convert the user input to an appropriate int value (you will need both multiplication and casting for this).
Answer:
number = float(input("Please input a decimal number: "))
number = int (number * 100)
second_digit = number % 10
first_digit = int(number / 10) % 10
print("Answer: " + str(first_digit) + " " + str(second_digit))
Explanation:
Ask the user to enter a decimal number (number = 57.8934)
Multiply it by 100 (number = 5789.34) and typecast to int (number = 5789)
Use the module to get the second digit (9)
Divide the number by 10 (578.9), typecast to int (578) and use module operator to get the first digit (8)
Print the numbers as requested
The code is:
int main(){
double n;
int v, d;
scanf("%lf\n", &n);
n = n*10;
v = (int)n;
d = v%10;
printf("The first digit is %d\n", d);
n = n*10;
v = (int)n;
d = v%10;
printf("The second digit is %d\n", d);
return 0;
}
----------------------
To get each decimal digit, we multiply by 10 until the digit, then calculate the remainder of the operation(mod) of the integer part relative to 10.For example:57.8934 x 10 = 578.934
The integer part is 578.
The remainder of the division of 578 by 10 is 8.
Now, we have to generalize it, thus:
int main(){
double n;
int v, d;
scanf("%lf\n", &n); -> Reads the double;
/*First digit*/
n = n*10; -> Multiplies by 10.
v = (int)n; -> Casts the integer part
d = v%10; 0 -> Remainder relative to 10 to get the first digit.
printf("The first digit is %d\n", d);
/*Second digit -> Does the same thing*/
n = n*10; -> Multiplies by 10.
v = (int)n; -> Casts the integer part
d = v%10; 0 -> Remainder relative to 10 to get the first digit.
printf("The second digit is %d\n", d);
return 0;
}
A similar problem is given at https://brainly.com/question/18340665
Which is used to input information on a laptop? Mouse Power button Memory storage Speakers
Answer:
Keyboard – one of the primary input devices used to input data and commands.
Explanation:
A laptop keyboard is more compact than a desktop keyboard to make the laptop smaller and lighter.
Answer:
mouse
Explanation:
flvs
What are three ways that you can protect and care for your camera? Why is taking care of your camera important?
Answer in 1-3 sentences.
avoid dirt and sand, touching your camera lense, and any type of liquid. be careful when cleaning dirt and sand off of your camera lense, as not doing so could scratch lense.
_________ attacks are becoming less common in modern operating systems.
a. Denial of service
b. SYN flood
c. Buffer overflow
d. None of the above
Answer:
c. Buffer overflow
Explanation:
In Computer programming, buffer can be defined as an area of memory set aside specially and specifically for holding data or informations.
A type of exploit that relies on overwriting contents of memory to cause unpredictable results in an application is known as buffer overflow. This ultimately implies that, buffer overflow is the process of exceeding the storage capacity of a memory buffer with data, beyond the amount it is designed to hold and therefore overwrites any adjacent memory locations.
Buffer overflow attacks are becoming less common in modern operating systems because the modern operating system usually leaves a space between buffers and randomize the layout of memory through call mapping, as well as through the use of runtime protection.
ASP PLZ Study the diagram of the geologic time scale.
Which method is most likely used to identify what happened before the start of the Paleozoic era?
1) Scientists study fossils from the Jurassic period.
2) Scientists observe index fossil records of the Mesozoic era.
3) Scientists examine fossil evidence during the Precambrian time.
4) Scientists explore the emergence of mammals and humans in the Cenozoic era.
Answer:
C. Scientists examine fossil evidence during the Precambrian time.
Explanation:
which of the following is another term for a variable, such as cost or schedule, that limits the freedom of design, development, or manufacture of a product?
Answer:
constraint
Explanation:
Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that are applicable.
require the network administrator or computer support technician to manage the system from a client workstation that has the right tools installed on it
work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX
are designed for very large networks and have strong multitasking capabilities
provide a graphical user interface that makes it easier for network administrators to learn the system
use wizards and setup devices as the user operating system, making it easier to set up network features
Answer:
The answers are -
work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX
provide a graphical user interface that makes it easier for network administrators to learn the system
use wizards and setup devices as the user operating system, making it easier to set up network features
Explanation:
Windows Server operating systems are a popular choice for a network because they work on networks that include using Windows operating systems as well as Mac OS, NetWare, or UNIX, provide a graphical user interface that makes it easier for network administrators to learn the system. The correct options are B and D.
What is operating system?An operating system (OS) is the program that controls all other application programs in a computer after being installed into the system first by a boot program.
Through a specified application program interface, the application programs seek services from the operating system (API).
The main job of an operating system (OS) is to control files and directories.
The management of files on a computer is the responsibility of the operating system. File creation, opening, shutting, and deletion all fall under this category.
Because they run on networks that use Windows operating systems as well as Mac OS, NetWare, or UNIX, Windows Server operating systems are a common choice for a network.
They also offer a graphical user interface that makes it easier for users to navigate
Thus, the correct options are B and D.
For more details regarding operating system, visit:
https://brainly.com/question/6689423
#SPJ2
Which of the following is NOT an advantage to using inheritance?
a. Code that is shared between classes needs to be written only once.
b. Similar classes can be made to behave consistently.
c. Enhancements to a base class will automatically be applied to derived classes.
d. One big superclass can be used instead of many little classes.
Answer:
D)One big superclass can be used instead of many little classes.
Explanation:
Inheritance could be described as getting new class on another existing class with almost same execution,
inheritance allows codes to be re-used. It should be noted that inheritance bring about the code sharing among class.
The advantages of using inheritance includes but not limited to
✓ Code that is shared between classes needs to be written only once.
✓Similar classes can be made to behave consistently.
✓ Enhancements to a base class will automatically be applied to derived classes.
A major disadvantage of inheritance is that child/children classes depends on parent class, hence a change in the parent class will affect the child class, therefore option C is the correction option.
Inheritance is a type of programming concept where by a class (Child) can inheritance methods, properties of another class (Parent).
Inheritance allows us to reuse of code, one advantage of Inheritance is that the code that is already present in base class need not be rewritten in the child class.
The different types of Inheritance are:
Single Inheritance.Multiple Inheritance.Multi-Level Inheritance.Hierarchical Inheritance.Hybrid Inheritance.Learn more:
https://brainly.com/question/4560494
A computer processor stores numbers using a base of: _____.a) 2b) 10c) 8d) 16
A computer processor stores numbers using a base of 16. The correct option is d).
What is a computer processor?A computer processor is a computer processing unit that is a CPU. CPU controls all the functions of the computer. It stores memory, and it has two types of memory. Short-term and long-term. It executes all the instructions given to the computer.
The design expert discusses the project three-dimensionally at this point in the process. To define the character of the finished project and an ideal fulfillment of the project program, a variety of potential design concepts are investigated.
The different kinds of computer processors are: microprocessor, microcontroller, embedded processor, digital signal processor
Therefore, the correct option is d). 16.
To learn more about computer processors, refer to the link:
https://brainly.com/question/15102947
#SPJ5
Which of the following is NOT a popular computer programming
language?
C++
Xero
C#
Java
The computer programming language i.e. not popular is Xero.
The following are the popular computer programming language:
C++C#JavaThe computer programming language is the language that is applying for writing the programs.
Therefore we can conclude that the computer programming language i.e. not popular is Xero.
Learn more about the computer here: brainly.com/question/24504878
A stop sign is a example of:
A. An advertisement
B. An animated text
C. An audio text
D. A visual text
Answer:
A visual text
Explanation:
This is because it is used to send information through something you can see. Visual text is an image, word or picture that doesn't move used to share information. So because a stop sign can't move and it uses words to share information it is an example of a visual text.
HOPE IT HELPED
Which of the following best defines Monte Carlo simulation?a. It is a tool for building statistical models that characterize relationships among a dependent variable and one or more independent variables.b. It is a collection of techniques that seek to group or segment a collection of objects into subsets.c. It is the process of selecting values of decision variables that minimize or maximize some quantity of interest.d. It is the process of generating random values for uncertain inputs in a model and computing the output variables of interest.
Answer:
d. It is the process of generating random values for uncertain inputs in a model and computing the output variables of interest.
Explanation:
Monte Carlo simulation is the process of generating random values for uncertain inputs in a model and computing the output variables of interest. It is a type of computational algorithm which is used to predict the probability of various outcomes based on repeated random samples or variables. It is used for better decisions making by providing information about the impact of a risk and for forecasting models.
which of the following terms best describes the product development process?
Answer:
D - Scientific investigation aims to design and implement an experiment to learn new information, whereas technological development aims to design a product to solve a problem.
Hulu suggestions? I just got it and I wanna know what's good :)
Answer:
I love hulu almost everything is good but I recommend Zoey's Extrordinary playlist
Explanation:
1) You have a class called Sheep that wants to keep track of how many Sheep have ever been created. Where is a good place to put that variable? 2) When an h file mentions another class, what is that called? (When a cpp file needs to use a class, they include it. This is an h file just mentioning a class, like it has a pointer of that type. You are promising the compiler that the class is in another file.) 3) What is a good guideline for deciding you must write a copy constructor, an assignment operator, and a destructor? 4) void Rock::Func( const Rock & X){} What is that argument type called and what does it do? 5) We saw overloading the = sign. How do you declare a class wanting to override the parenthesis operator?
Answer:
The counter variable for the sheep count should be declared and initialized before the constructor in the class. The extern keyword should be used to declare the class in the receiving C source file. A constructor is defined when there is a need to instantiate an object with an argument and an assignment operator is used to initialize a variable. The const keyword is used to specify a variable whose value should not change during the course of the program execution.
Explanation:
The C programming language is an object-oriented programming language and has variable specifiers to define variable scopes in a program.
Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ names and main superpower. Make sure that each field in the record is separated by a space.
Answer:
Open a text-based editor like Microsoft word, notepad, libraoffice, etc, type the name of the super hero on the first field and the main power on the second field. Then click on the file menu or press ctrl-s and save file as superheroes.dat.
Explanation:
The file extension 'dat' is used to hold data for programs, for easy access. The file above holds data in fields separated by a space and has multiple records.
Explain what a wiki is and list its advantages.
Explanation:
Wikis are defined as a form of a website or web page or a database where the users can work on the data, they can even add or edit the data. Wikis use a very quick as well as a easy syntax that allows the users to format the text and create various links between the pages. The users need internet browsers for that.
One of the main advantage of wiki is that it provides ability to collaborate asynchronously, and also without time constraints.Besides it also provides a beneficial function of something. It is free and not expensive.
Select one
True
False
Fin
When you insert a tall, PowerPoint assumes you want this custom background on only the current slide displayed
To make this background appear on all slides in the presentation, click the Apply to button in the Format
Background dialog box
Select one
Answer:
True
Explanation:
The _____ is the size of the opening in the camera that the light passes through.
Shutter
Lens
Aperture
Sensor
Answer:
now you can give them brainlist by clicking on the crown on their answer! :)
Explanation:
If you have a document that is relevant to more than one folder in your computer what should you do?
Answer:
save it to my docs
Explanation:
How is a Creative Commons license different from a regular copyright? As a reminder, in the warm-up we saw the this scenario: ----------------------------------------------------------------------------------------------------------------------- Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a week later you find out someone took that image and put it on a T-shirt that they’re selling for $10 each. -------------------------------------------------------------------------------------------------------------------- Now that we understand Copyright, what would need to change in order for the scenario from the warm-up to be okay?
Explanation:
You need to change the whole thing and do it differently.. And register it.
The thing that'll need to be changed in order for the scenario from the warm-up to be okay is to create a creative common license which will give room for people to be able to use my work and sell items that have my work on them.
In this case, the creative commons license enables one to share copyrighted work easily. It should be noted that intense protections are put on a work when the work is copyrighted. With the creative common, a person can allow others use their work as long as the person abide to rules.In conclusion, creative common allows one have control of one's work.
Read related link on:
https://brainly.com/question/
A medium is a:
A.tool used to measure important information
B.group of tools that are connected together.
C.set of tools used together to convey ideas.
D. Tools used to communicate information it ideas
What does an output allow a computer to do
Output devices allow the computer system to interact with the outside world by moving data into and out of the system.
Answer:
the previous answer belowed me looked it up online LOL
but im taking this quiz rn and the answer is either Display information or Recieve information thanks bye
Explanation:
Which statement is true about the purpose of a work in process constraint?
The available options are:
A. It identifies possible constraints for Solution completion.
B. It helps analyze, approve, and track Portfolio Epics and Enablers.
C. It captures where all new "big" ideas come from.
D. It encourages collaboration and enables
Answer:
It identifies possible constraints for Solution completion
Explanation:
Work in Process is an activity or operational related term that describes a form of self-assigned restriction by a team or organization to aid them in regulating their responsibility, exercise corporate reasoning, and recognize alternatives for lasting development.
Hence, in this case, considering the available option, the correct answer is that Work in Process " identifies possible constraints for Solution completion."
The statement is true about the purpose of a work in process constraint is that it identifies possible constraints for Solution completion.
The WIP limits is often called the work-in-process limits. They are known as fixed constraints. it is implemented on Kanban boards, and it aids teams actively to remove waste from their processes.It also helps teams to optimize their workflows for value delivery.
The WIP limits is used in agile development as it set the maximum amount of work that can exist in each status of a workflow.
Learn more from
https://brainly.com/question/15395767
The full question is below
Which statement is true about the purpose of a work in process constraint?
The options to the question are:
A. It identifies possible constraints for Solution completion.
B. It helps analyze, approve, and track Portfolio Epics and Enablers.
C. It captures where all new "big" ideas come from.
D. It encourages collaboration and enables
Which of the following Office Online apps is most effective for creating multimedia presentations?
Answer:
Powerpoint Online
Explanation:
Powerpoint is used to create presentations.
What is considered to be the core of the Unix operating system ?
Answer:
My lips
Explanation:
Just kidding what is that?
write a program that first asks the user to enter three real numbers using GUI input. Print the sum if all three numbers are positive, print the product of the two positive numbers if only one is negative - use a nested if. Then, ask the user to enter two real numbers from the console. If both numbers are negative, print the quotient.
Answer:
Here is the complete program:
import javax.swing.JOptionPane; //to use GUI in JAVA application
import java.util.Scanner; //to take input from user at console
public class Main {
public static void main(String[] args) { //start of main function body
String num1, num2,num3; //declare three variables to store strings of numbers for input dialog
double number1, number2, number3, sum,product; //declare three double type variables to hold the real numbers
num1 = JOptionPane.showInputDialog("num1"); //shows a dialog box prompting user to enter value of first number i.e. num1
number1 = Double.parseDouble(num1); //scans and reads the value of first input number i.e. number1
num2 = JOptionPane.showInputDialog("num2"); //shows a dialog box prompting user to enter value of second number i.e. num2
number2 = Double.parseDouble(num2); //reads number2
num3 = JOptionPane.showInputDialog("num3"); //shows a dialog box prompting user to enter value of third number i.e. num3
number3 = Double.parseDouble(num3); //reads number3
if(number1>0&& number2>0 && number3>0){ //checks if all three numbers are positive
sum = number1 + number2+ number3; //displays the sum by adding all three positive numbers
JOptionPane.showMessageDialog(null, "the sum is : " + sum , "Results", JOptionPane.PLAIN_MESSAGE ); } // displays the result of sum in a message dialog box
if(number1<0 && number2>0 && number3>0) { //checks if number2 and number3 are positive
product = number2*number3; //computes product
JOptionPane.showMessageDialog(null, "the product is : " + product , "Results", JOptionPane.PLAIN_MESSAGE ); } //displays the result
else if (number2<0&&number1>0&&number3>0){ //checks if number1 and number3 are positive
product = number1*number3; //computes product
JOptionPane.showMessageDialog(null, "the product is : " + product , "Results", JOptionPane.PLAIN_MESSAGE ); } //displays the result
else if (number3<0 && number1>0 && number2>0) { //checks if number1 and number2 are positive
product = number1*number2; //computes product of 2 positive numbers
JOptionPane.showMessageDialog(null, "the product is : " + product , "Results", JOptionPane.PLAIN_MESSAGE ); } //displays the result
else { /.if all the numbers are positive.
/*However this part is optional. You can just use else part for above else if statement and exclude this else part. In this way the product of all three positive numbers is not computed and product is only computed when only two numbers of the three are positive */
product = number1*number2*number3; //computes product of all three positive numbers
JOptionPane.showMessageDialog(null, "the product is : " + product , "Results", JOptionPane.PLAIN_MESSAGE ); } //displays the result
Scanner scan = new Scanner(System.in); //creates a Scanner class object
double value1 , value2, quotient; //declares variables to hold the values of two real numbers and the result of division of the two real numbers is stored in quotient variable
System.out.println("Enter the first real number: "); //prompts user to enter the value of first real number from the console
value1 = scan.nextDouble(); //reads the first number from user
System.out.println("Enter the second real number : "); //prompts user to enter the value of second real number from the console
value2 = scan.nextDouble(); //reads the second number from user
if(value1<0&&value2<0) { //checks if both the numbers are negative
quotient = value1/value2; //compute the quotient
JOptionPane.showMessageDialog(null, "the quotient is : " + quotient , "Results", JOptionPane.PLAIN_MESSAGE ); } //displays result
else //if both numbers are not negative
JOptionPane.showMessageDialog(null, "Both numbers are not negative" ); //displays this message in a dialog box
} }
Explanation:
In the above given code if you want to display the outputs in console then alter the following statements as follows:
if(number1>0&& number2>0 && number3>0){
sum = number1 + number2+ number3;
System.out.println("the sum is : " + sum); }
if(number1<0 && number2>0 && number3>0) {
product = number2*number3;
System.out.println("the product is : " + product); }
else if (number2<0&&number1>0&&number3>0){
product = number1*number3;
System.out.println("the product is : " + product); }
else if (number3<0 && number1>0 && number2>0) {
product = number1*number2;
System.out.println("the product is : " + product); }
else {
product = number1*number2*number3;
System.out.println("the product is : " + product); }
Scanner scan = new Scanner(System.in);
double value1 , value2, quotient;
System.out.println("Enter the first real number: ");
value1 = scan.nextDouble();
System.out.println("Enter the second real number : ");
value2 = scan.nextDouble();
if(value1<0&&value2<0) {
quotient = value1/value2;
System.out.println("the quotient is : " + quotient); }
else
System.out.println("Both numbers are not negative");
Notice that all the JOptionPane.showMessageDialog statement are changed with System.out.println which prints the results on the console.