assuming this is windows
right click the windows icon on the taskbar and click device manager for a list
Answer:
computer is the unique feature of the software used in hospital
Answer:
RuntimeException
After the method call
Explanation:
Image showing the program output when executed is attached.
In the code snippet given, inside the main method which is the beginning of program execution, there is a try-catch blocks.
The try block is executed first and the catch block is only executed if an exception is thrown.
The try block has two statement to execute:
try {
method();
System.out.println("After the method call");
}
The first statement is executed by calling the method called method(). The second statement display the output: "After the method call".
When method() is called, a runtime exception is thrown and a catch block is executed which display the message: "RuntimeException".
runtime exception occur during the program execution. From the above code snippet, the runtime exception is thrown/caused by the line below:
Integer.parseInt(s);
It is cause because the when the string is converted to integer, it is not assigned to any variable and this lead to the runtime exception.
Answer:
do{
std::cout << "input an even number: ";
std::cin >> n;
even=n%2;
if (even==0)
std::cout << "Good job!\n";
else
std::cout << n <<" is not an even number\n";
}while(n!=999);
Explanation:
#include <iostream>
#include <string>
int main()
{ int n=0,even;
do{
std::cout << "input an even number: "; //print on screen to input the number
std::cin >> n; //put that value on n variable
even=n%2;
if (even==0) //if even is zero the number is even
std::cout << "Good job!\n";
else //if even is not zero the number is odd
std::cout << n <<" is not an even number\n";
}while(n!=999); // we will repeat the proccess while n is diffrente from 999
}