Answer:
The output to the given code as follows:
Output:
10
100
64
36
16
4
0
4
16
36
64
Explanation:
In the given java code, an integer variable "i" and an array number is defined, which size is 10, in the next step two for loop is declared, that can be described as follows:
- In the first loop, array use loop variable "i" use, which minus the value of 5 and multiplies by 2, and it will calculate the square of that number.
- In the next step, a for loop is declared, that prints these array number variable square.
Some of the advanced viruses do this. So it would be true.
Answer:
Turn off the TV and face the person who is speaking.
Answer:
import java.util.Scanner;
public class HollowSquare
{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
int size;
System.out.print("Enter the size : ");
size = scan.nextInt();
if(size>=1 && size<=20)
{
for(int i=0; i<size; i++)
{
for(int j=0; j<size; j++)
{
if(i==0 || j==0 || i==size-1 || j==size-1)
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
}
else
System.out.println("Invalid size.");
}
}
Technologies that allow for instant worldwide communication include mobile phones and internet access. Cell phones
, wireless devices and smart phones are technologies that have made global communication instant and more effective.
The internet and the development of digital technology (computer-based technology) in particular, have made the most significant impact on globalization.