Answer:
DECLARE SUB SQUARE (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL SQUARE(N)
END
SUB SQUARE (N)
S = N ^ 2
PRINT “SQUARE OF NUMBER “; S
END SUB
Answer:
The correct answer to the given question is: "Text".
Explanation:
The windows form object is part of the vb.net.The term vb.net is divided into two parts (vb+.net). The term vb stands for visual basic and the .net stands for the network enable technology. It is a language that is not case sensitive. It is an object-oriented programming language like c++, java. It is used for making a wide range of Windows, Web, Mobile, and Office applications. which can be built on the .NET Framework. As we know that vb.net is used for making window applications. when we open windows form there is a two type of form first for the design and second for coding. In the designing page, there is text property.
To use this property we display the text into the title bar.
So the correct answer is text.
Answer:
C++ code for encryption is given below
Explanation:
#include <iostream>
using namespace std;
//functions to encrypt and decrypt
void encrypt(char str[]);
void decrypt(char str[]);
int main(){
char str[200];
bool done = false;
while(!done){
cout << "Enter a string (enter * to stop): ";
cin.getline(str, 200);
if(str[0] == '*' && str[1] == '\0')
done = true;
else{
encrypt(str);
cout << "Encrypted: " << str << endl;
decrypt(str);
cout << "Decrypted: " << str << endl;
}
cout << endl;
}
}
void encrypt(char str[]){
int i = 1;
for(int j = 0; str[j] != '\0'; j++){
str[j] += i;
i++;
if(i == 11)
i = 1;
}
}
void decrypt(char str[]){
int i = 1;
for(int j = 0; str[j] != '\0'; j++){
str[j] -= i;
i++;
if(i == 11)
i = 1;
}
}
It is mostly a science. It deals with computer science and discrete mathematics.