Answer:
// program in java.
// package
import java.util.*;
// class definition
class SquareDisplay
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// variable
int num;
// scanner object to read input
Scanner scr=new Scanner(System.in);
System.out.print("Enter an integer in the range of 1-15:");
// read integer from user
num=scr.nextInt();
// read until input is not in range 1-15
while(num<0 || num>15)
{
System.out.print("wrong input!!enter again:");
// read again
num=scr.nextInt();
}
// print square of X
for(int a=1;a<=num;a++)
{
for(int b=1;b<=num;b++)
{
System.out.print("X");
}
System.out.println();
}
}catch(Exception ex){
return;}
}
}
Explanation:
Read an integer from user and assign it to variable "num".Check if input is not in range 1-15 then ask again until user enter a number between 1-15 only.Then print a square of character "X" with the help of two nested for loops.
Output:
Enter an integer in the range of 1-15:-4
wrong input!!enter again:20
wrong input!!enter again:4
XXXX
XXXX
XXXX
XXXX
a geometric constraint relates to other parts of a geometric figure. Geometric constraint defines dimensions of an object in computer aided design or CAD
Answer:
By using the save as tab
Explanation:
The save as option allows a user to make another different copy of the same document, or to save the document in another location within the computer system. The shortcut key to quickly access the save as option, is F12. The save as option can also be accessed by going through the following steps
1) Click the File tab
2) Click on the Save as option
3) Select a location to save the file then click save to confirm selection and save the file.
Cloud computing allows for large chunks of data to be stored in data centers with owners having the ability to access stored information from any devices or location using their login credentials ensuring information are safe, secure and available over a an infinitely long period of time.
- Sustainability involves keeping hold of something over a very long period of time.
- When data or information are saved on online data centers which is made possible by cloud computing. Cloud computing ensures that data isn't saved on an individual's personal memory storage such as local hard drive or memory Cards where it could be lost at anytime.
- Data is stored online in data centers where it can be accessed over a very long period of time.
Therefore, the ability to get hold of time long information is an essential and important sustainability benefit offered by cloud computing.
Learn more :brainly.com/question/24875533
Answer:
- import java.util.Scanner;
-
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
-
- System.out.print("Input first string: ");
- String string1 = input.nextLine();
-
- System.out.print("Input second string: ");
- String string2 = input.nextLine();
-
- System.out.print("Start index for first string: ");
- int i1 = input.nextInt();
-
- System.out.print("Start index for second string: ");
- int i2 = input.nextInt();
-
- System.out.print("Number of characters to be compared: ");
- int n = input.nextInt();
-
- if(string1.regionMatches(true, i1, string2, i2, n)){
- System.out.println("The strings are equal.");
- }
- else{
- System.out.println("The strings are not equal.");
- }
- }
- }
Explanation:
The solution code is written in Java.
Firstly create a Scanner object (Line 5).
Next, use the Scanner object and nextLine method to get user input for string1 and string 2 (Line 7 - 11 )
Next, proceed to get the start index for first and second string using nextInt (Line 14 and Line 17) and followed with number of characters to be compared (Line 20).
Use the regionMatches method by passing all the input values as argument (Line 22) and if we pass the sample input we shall get the true and the program shall display the message "The strings are equal." (Line 22- 23)