Answer:
// program in C++.
#include <bits/stdc++.h>
using namespace std;
int main() {
// variable
int num;
cout<<"Enter the number between 20 and 98: ";
// read number
cin >> num;
while(num<20||num>98)
{
cout<<"Wrong input!!enter number between 20-98 only:";
cin>>num;
}
cout<<"The output is: ";
while(num % 10 != num /10)
{
// print numbers.
cout<<num<<" ";
// update num.
num--;
}
// display the number.
cout<<num<<endl;;
return 0;
}
Explanation:
Read a number from user and assign it to variable "num".Check if entered number is in between 20-98 or not.If input number is less than 20 or greater than 98 then ask again to enter a number between 20-98 until user enter a valid input.Then print the countdown from input number till both the digit of number are same.
Output:
Enter the number between 20 and 98: 99
Wrong input!!enter number between 20-98 only:12
Wrong input!!enter number between 20-98 only:93
The output is: 93 92 91 90 89 88
Enter the number between 20 and 98: 77
The output is: 77
Computer hacking<span> refers to the practice of modifying or altering </span>computer<span> software and hardware to accomplish a goal that is considered to be outside of the creator's original objective.
</span>
“bot,” is a computer under the control of a hacker <span>without the knowledge of the computer user.</span>
Answer:
C: disruptive technology era
Explanation:
There are five main stages in IT infrastructure era and the are, in order from the oldest to the newest; the mainframe and minicomputer era, the personal computer era, the client/server era, the enterprise era, and the cloud computing being the newest in the five stages eras of IT infrastructure.
Answer:
- public class FindDuplicate{
-
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
-
- int n = 5;
- int arr[] = new int[n];
-
- for(int i=0; i < arr.length; i++){
- int inputNum = input.nextInt();
- if(inputNum >=1 && inputNum <=n) {
- arr[i] = inputNum;
- }
- }
-
- for(int j =0; j < arr.length; j++){
- for(int k = 0; k < arr.length; k++){
- if(j == k){
- continue;
- }else{
- if(arr[j] == arr[k]){
- System.out.println("True");
- return;
- }
- }
- }
- }
- System.out.println("False");
- }
- }
Explanation:
Firstly, create a Scanner object to get user input (Line 4).
Next, create an array with n-size (Line 7) and then create a for-loop to get user repeatedly enter an integer and assign the input value to the array (Line 9 - 14).
Next, create a double layer for-loop to check the each element in the array against the other elements to see if there is any duplication detected and display "True" (Line 21 - 22). If duplication is found the program will display True and terminate the whole program using return (Line 23). The condition set in Line 18 is to ensure the comparison is not between the same element.
If all the elements in the array are unique the if block (Line 21 - 23) won't run and it will proceed to Line 28 to display message "False".