Question: Check Length Write code that checks the value stored in a numeric variable called length. If the length is greater than the value in the
Check Length Write code that checks the value stored in a numeric variable called length. If the length is greater than the value in the constant Max, print "Warning: length exceeds maximum". Otherwise, print "Length is acceptable". Assume that length and max have already been assigned values. Solve It! Print the Longer String Write code that prints the longer of two strings that are stored in the variables stri and str2. If both strings are equal in length, print the value of stri. Assume that both variables have already been given values. Solve It
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
