write a java program for you are given a string representing a sequence of N arrows,each pointing in one of the four cardinal directions:up(^),down(v),left(<),right(>) . write a function solution that,given a string S denoting the direction of the arrows,returns the minimum number of arrows that must be rotated to make them all point in the same direction.
Even though i write this code i am not able to get proper output.please help me to do. This
1.The council would like to know how many students in a certain class is qualified to vote this coming campus election. Only student (denoted by S) of BIT firs year students , and the age of each student in that class . Your flowchart should accept the value of age students who are qualified to vote. If the class size is 5 then , your flowchart should accept the age of 5 students (one at a time) if students above (20 & 21).
Note: The numbers are sample data only.
2. Write the equivalent pseudocode of the flowchart created in number 1.
For you to explore Java String Methods, you need to create a Java program that will
perform the following:
1. Count the number of characters in a string input;
2. Change the orientation of the characters from lowercase to uppercase and vice
versa;
3. Change every occurrence of charToBe replaced is replaced with
charReplacedWith;
4. Display the reverse of the entire string input.
8. Square Root
by CodeChum Admin
You've learned in the past lessons on how to use square root functions, right? Then let's take your knowledge to the test. Print out the square root of a given integer with only two decimal places.
Ready, solve, and go!
Input
A line containing an integer.
4
Output
A line containing a decimal with two decimal places.
2.00
7. Enumeration
by CodeChum Admin
Have you ever answered a test question that tells you to enumerate a series of things, but the answer must be in a sentence? Quite tiring to write those things separated by commas and a single space, isn't it?
Then let's try coding it instead!
Input
Five lines containing a string on each.
C
C#
Java
Python
Javascript
Output
A single line containing all the strings separated by a comma and a space.
C, C#, Java, Python, Javascript
6. Three Lines Apart
by CodeChum Admin
Do you like reading books? If you do, then you must have encountered texts that have quite a wide space with dots in between them, just like pausing or thinking before proceeding the narration. Let's try doing that here in Python, shall we?
Input
Two lines containing a string on each.
some string
another string
Output
The first line contains the first inputted string.
The next three lines contains a dot symbol on each.
The last line contains the second inputted string.
some string
.
.
.
another string
by CodeChum Admin
Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.
You're a programmer, right? Then code this one for me!
Input
A line containing three numbers (positive or negative, may have decimal places) separated by a space.
1.6·-2·-1Output
A line containing a decimal/float with one decimal place.
3.24. Leftovers
by CodeChum Admin
We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.
Care to do it for me?
Input
A line containing two integers separated by a space.
10 3
Output
A single line containing an integer.
1
3. The More, The Lengthier
by CodeChum Admin
I think it's already a given that two sentences combined will always be longer than a single sentence alone, but to prove just how long two sentences can be, why don't we let our program show the combined length of the two randomly inputted strings?
Let's get it on!
Input
Two lines containing a string on each.
Python is fun
I love CodeChum
Output
A single line containing an integer.
28