Deleting a character when you make a mistake and the print it without errors
Answer:
1. Supercomputers
Supercomputers are very expensive and very fast. They are the most powerful computers we have in the world.
Supercomputers are optimized to execute only a small number of programs. This makes it possible for them to execute these few programs at a very high speed. Due to their inhibiting cost, they are used in high-end places like in scientific research centers. The supercomputer consists of thousands of processors, allowing it to clock in at very high speeds measured by petaflops.
These computer types are also very large in size due to the numerous parts and components involved in their design.
A good example of a supercomputer is Tianhe-2, which is located in the National Supercomputer Center in Guangzhou, China. It features 3.12 million cores, allowing it to run at speeds of 33.86 petaflops.
2. Mainframe Computers
These are large and expensive computers that are capable of supporting thousands of users simultaneously. They are mostly used by governments and large organizations for bulk data processing, critical applications, and transaction processing. They are ranked below supercomputers.
3. Minicomputers
Minicomputers are mid-sized computers. In terms of size and power, they are ranked below mainframes. A minicomputer is a multiprocessing system capable of supporting from 4 to about 200 users simultaneously.
The use of the term minicomputer has diminished since the introduction of microprocessors. These machines are now more commonly called midrange computers.
4. Microcomputers
A microcomputer, also known as a personal computer, is designed to be used by one user at a time. The term microcomputer relates to the microprocessor that is used for the purpose of processing data and instruction codes. These are the most common computer types since they are not very expensive
Answer: Depends on the power of the computer /computers and the UPS
Explanation: For someone who had a big connected network of computers and printers we would plug the computer or server into the UPS as well as the monitor and sometimes a printer sometimes the monitor was plugged into the wall
When you get a UPS you must plug it in for a certain time could be hours or even a day. A USP has a big battery in it and you must charge it (sometimes it comes semi-charged but you must plug it in to strengthen it. )
there are two connector wires that you affix to the battery and you must put a lot of strength into it to make it secure.
So in closing, you can get away with two like a desktop and a laptop.
Read your documentation that comes with the UPS
Answer:
import java.util.Scanner;
public class DataConstraint {
public static void main(String[] args) {
System.out.print("Enter month, day, year separated by spaces :");
Scanner sc=new Scanner(System.in);
int M,D,Y;
M=sc.nextInt();
D=sc.nextInt();
Y=sc.nextInt();
if(1<=M && M<=12 && 1<=D && D<=31 && Y>=1)
{
if(M==4 || M==6 ||M==9 || M==11){
if(D==31) {
System.out.println("month "+M+" can not have more than 30 days");
System.exit(0);
}
}
else if(M==2)
{
if((Y%400==0) || (Y%4==0 && Y%100!=0)) {
if(D>=30) {
System.out.println("month "+M+" cannot have "+D+" days");
System.exit(0);
}
}
else {
if(D>=29) {
System.out.println(Y+" is not a leap year, "+D+" is invalid");
System.exit(0);
}
}
}
System.out.println(M+" "+D+" "+Y+" is a valid date");
}
else{
if(1>=M || M>=12) System.out.println(M+" is not a valid month");
if(1>=D || D>=31) System.out.println(D+" is not a valid date");
if(Y<1) System.out.println("year can not be negative");
}
}
}
Explanation:
- Use a conditional statement to check the month is between 1 and 12.
- Check that the date is between 1 and 31 and year must be positive value.
- If no. of days are more than 29, then the year cannot be a leap year.
Answer:
B) (x<=1)
Explanation:
Though this code given will run perfectly without any requirement of base case.But still we have to include a base case I will suggest (x<=1) because the value of x is decreased by one at each recursive call so it can handle it very well and it can handle negative values of x also if user enters it by mistake since factorial is for positive numbers only.