Answer:
Following is the program in C++ language
#include <iostream> // header file
#include <iomanip> // header file
using namespace std; // namespace std;
void problem2() // function definition
{
int num ; // variable declaration
cout << "Enter the Number: ";
cin >> num; // Read the input by user
cout << "Resulatant is:";
for(int k = 0; k <num; k++) // iterarting the loop
{
std::cout << std::setw(num); // set width
std::cout <<"*"; // print *
}
}
int main() // main function
{
problem2();// function calling
return 0;
}
Output:
Enter the Number: 3
Resulatant is: * * *
Explanation:
Following is the description of program
- Create a function problem2().
- Declared a variable "num" of "int" type .
- Read the input in "num" by the user .
- Iterating the for loop and set the width by using setw() and print the asterisk.
- In the main function calling the problem2().
Answer:
The correct option is : c. 0
Explanation:
The XOR Cipher is an encryption technique which involves an operator called the xor operator. The XOR operator is denoted by (⊕).
This cryptographic technique uses key to convert the plain text into the encoded value with the help of XOR multiplication.
<u>Example: 1 + 1 = 0 </u>
This value, 0 is encrypted. It is obtained from the plain text, the provided key and the xor operator.
<u>for example:</u>
Plain message :
1011
key to encrypt Plain message
:
1001
The encrypted message is :
1⊕1=0
0⊕0=0
1⊕0=1
1⊕1=0
encrypted message is :
0010
<u>The result of adding two bits 1 and 1 in xor cipher : 1⊕1 =0</u>
public class MyClass {
public static void main(String args[]) {
int x = 1;
int total = 0;
for (int i = 1; i <= 10; i++){
x *= i;
total += x;
}
System.out.println(total);
}
}
This program finds the sum of that series to the tenth term, the sum is: 4037913. I hope this helps.
KE is the energy possessed by an object by virtue of it being in motion. PE is the energy possessed by an object by virtue of its position. It can be transferred from one object to another and this happens during collisions. Potential Energy, on the other hand, cannot be transferred from one object to another.
Answer:
Option(b) i.e "utility virus" is the correct answer to the given question
Explanation:
The utility virus sometimes affected the operating system .It created the new files in the computer that makes the computer system slow .The utility virus making the spreading of malware in the computer system
The main objective of utility virus damaging the software program that impacts a pc or infects also it negatively by changing the way the machine operates without the user knowledge or the permission.
- File conversion is used for converting the file extension it does not impact on computer damaging that's why this option is incorrect .
- Hotspot is used to giving the access of internet it does not impact on computer damaging that's why this option is incorrect .
- File compression utility and ZIP is used to reducing the file size it does not impact on computer damaging that's why this option is incorrect.
Therefore utility virus is the correct answer .