Answer:
Following is the code for filter:
public class filter
{ public static void main(String[] args)
{ int x = StdIn.readInt();
System.out.print(" " + x + " ");
while(!StdIn.isEmpty())
{ int y = StdIn.readInt();
if(y != x)
System.out.print(" " + y + " ");
x = y;
}
}
}
Explanation:
- A public class filter is used.
- The main function will accept a single argument as string[], it is also known as java command line argument.
- Now the Stdln.readInt is used to read the integers in the sequence and store it in integer x.
- The value stored in variable x will be printed using System.out.print
- Now unless the Stdln.readInt gets an empty value, check each value of sequence and store in variable y.
- If y is not equal to previous value x, print it and shift the value of y into x.
- Repeat the loop again.
i hope it will help you!
Answer:
Not sure what language, but in python a super basic version would be:
val1 = 98
val2 = 87
val3 = 84
val4 = 100
val5 = 94
sum = val1 + val2 + val3 + val4 + val5
avg = sum / 5
print(avg)
Explanation:
To <span>rite a statement that terminates the current loop when the value of the int variables x. and y.are equal please check below:
</span>
if (x == y) break; // exit loop
I hope the answer will help you. Thank you.
is a small handheld computer that performs simple tasks such as taking notes, scheduling appointments, and maintaining an address book and a calendar PDA.
<h3><u>
Explanation:</u></h3>
Personal Digital Assistant is the full form for PDA. PDAs are the computers in smaller size. They perform all works that are performed by a computer. They help you in viewing all the documents that you need, scheduling all your works,etc. They act as a mini sized computer that you can take where ever you go.
Using PDAs you can easily schedule any tasks, take notes, maintain all your contacts in address books,etc. Even though the markets of PDAs is not having higher demands because of the existence of i phones and other devices that are identical to i phones, there are still some usages and demands for PDAs. These are used in industries and businesses.
Answer:THE ANSWER IS A.
Explanation:I DID IT AND I GOT 100