Answer:
import java.util.*;
public class Country
{
public static void main(String args[])
{
char ch,temp;
int flag = 0;
String country;
ArrayList<String> countries = new ArrayList<String>();
Scanner sc = new Scanner(System.in);
do
{
System.out.println("enter the country you have visited:\t");
country = sc.next();
for(int i=0;i<countries.size();i++)
{
if(countries.get(i).equals(country))
{
System.out.println("you have already entered the country");
flag = 1;
break;
}
}
if(flag == 0)
{
countries.add(country);
flag = 0;
}
System.out.println("want to add another country(y/n):\t");
ch = sc.next().charAt(0);
}while(ch!='n');
Collections.sort(countries);
System.out.println("Countries you have visited:\t"+countries);
System.out.println("Total number of contries visited:"+countries.size());
}
}
Explanation:
Answer:
Digital logic circuits made of cascaded flip flops.
The different types of Bit Shift Registers are; Serial-In Serial-Out, Parallel-In Parallel-Out, Serial-In Parallel-Out, Parallel-In Serial-Out.
Shift registers can be used as converters to translate data, as delay circuits or counters.
Explanation:
Shift Registers are digital logic circuits made of cascaded flip flops. Their main function is to shift their contents (bits) to the right or to the left one bit at a time. Bit Shift Registers can process data either parallelly or serially. So the different types of Bit Shift Registers are;
- Serial-In Serial-Out
- Parallel-In Parallel-Out
- Serial-In Parallel-Out
- Parallel-In Serial-Out
Because of their ability to convert data from parallel to serial, shift registers can be used as converters to translate data. Some of their other applications are also delay circuits or counters, storing and manipulating data etc.
I hope this answer helps.
CTRL/CMD + B (BOLD)
CTRL/CMD + U (Underline)
CTRL/CMD + ] or [ (change font size)
The answer is False.
The first computer was not developed to spy on communist by the government. The first computer was announced in 1946, the ENIAC (Electronic Numerical Integrator and Computer). It was built for general purposes like solving large mathematical problems. The US Army designed the computer to calculate the artillery firing tables.