Answer:
See explaination
Explanation:
public class PalindromeChange {
public static void main(String[] args) {
System.out.println("mom to non palindrom word is: "+changTONonPalindrom("mom"));
System.out.println("mom to non palindrom word is: "+changTONonPalindrom("aaabbaaa"));
}
private static String changTONonPalindrom(String str)
{
int mid=str.length()/2;
boolean found=false;
char character=' ';
int i;
for(i=mid-1;i>=0;i--)
{
character = str.charAt(i);
if(character!='a')
{
found=true;
break;
}
}
if(!found)
{
for(i=mid+1;i<str.length();i++)
{
character = str.charAt(i);
if(character!='a')
{
found=true;
break;
}
}
}
// This gives the character 'a'
int ascii = (int) character;
ascii-=1;
str = str.substring(0, i) + (char)ascii+ str.substring(i + 1);
return str;
}
}
If the VEHICLE(S) is/are out of balance, the driver will feel a pounding or shaking through the steering wheel.
This pounding <span>shortens the life of all the suspension components and hence</span> <span>produce an uneven tire wear and which eventually </span>will<span> increase fuel consumption.</span>
Answer:
<u>The total time elapsed from the time a bit is created (from the original analog signal at Host A) until the bit is decoded (as part of the analog signal at Host B is </u><u>25.11 ms</u>
Explanation:
Host A first converts the analog signal to a digital 64kbps stream and then groups it into 56-byte packets. The time taken for this can be calculated as:
time taken 1= 
= (56 x 8) bits / 64 x 10³ bits/s
= 7 x 10⁻³s
time taken 1= 7 ms
The transmission rate of the packet from Host A to Host B is 4 Mbps. The time taken to transfer the packets can be calculated as:
time taken 2= (56 x 8) bits / 4 x 10⁶ bits/s
= 1.12 x 10⁻⁴ s
time taken 2= 112 μs
The propagation delay is 18 ms.
To calculate the total time elapsed, we need to add up all the time taken at each individual stage.
<u />
<u> = Time taken 1 + Time taken 2 + Propagation Delay</u>
= 7 ms + 112 μs + 18 ms
= 0.025112 s
= 25.11 ms
I'd suggest he uses
LOOKUP Function.
You can use the LOOKUP function when you need to look in a
single column or row and find a value from the same position in a corresponding
column or row. We have a much improved VLOOKUP that can also be used to search
one row or column or multiple rows and columns.
Answer:
Replace /* Your code goes here */ with
for(i =0; i<NUM_VALS; i++)
{
printf("%d", origList[i]*offsetAmount[i]);
printf(";");
}
Explanation:
The first line is an iteration statement iterates from 0 till the last element in origList and offsetAmount
for(i =0; i<NUM_VALS; i++)
{
This line calculates and print the product of element in origList and its corresponding element in offsetAmount
printf("%d", origList[i]*offsetAmount[i]);
This line prints a semicolon after the product has been calculated and printed
printf(";");
Iteration ends here
}