The enter key is used when we want to go directly to the next line while writing whereas through word wrap the cursor automatically shifts to the next line when the word limit for a particular line is exceeded
Answer:
The solution code is written in C++
- float cellPhone(int m, int tx){
- float COST_PER_MIN = 0.1;
- float COST_PER_MESSAGE = 0.2;
-
- float bill_amount = m * COST_PER_MIN + tx * COST_PER_MESSAGE;
-
- return bill_amount;
- }
Explanation:
Firstly, declare a function named cellPhone() that takes two input parameters, m and tx (Line 1).
Since the policy of the carrier company is not given in the question, I make a presumption that the cost per minutes is $0.10 and the cost per message is $0.20 (Line 2- 3).
Next, apply the formula m * COST_PER_MIN + tx * COST_PER_MESSAGE to calculate the total bill (Line 5) and return the bill_amount as function output (Line 7).
Answer:
The different variable in C is 21213316700.
Explanation:
Given value:
Total value = letters + underscore value
Total value = 52 + 1
Total value =53
choice for first character = 53 letters +10 digits
first character = 63
choice for remaining characters
So,
Variable number With one 1 character = 53
Variable number With 2 character = 53 × 63
Variable number With 3 character = 53 × 63²
Variable number With 4 character = 53 × 63³
.
.
.
Variable number With 7 character = 
Total difference variable = 53 + 53 × 63+ 53 × 63²+ 53 × 63³+....+ 
Total difference variable = 53(1 + 63 + 63²+ 63³+ .... +
)
Formula:

Total difference variable

Answer:
myString=myString.toUpperCase();
Explanation:
In java to change all characters of a string to upper case we use .toUpperCase() method.It will convert string to upper case.
Implementation in java.
import java.util.*;
class Solution
{
public static void main (String[] args) throws java.lang.Exception
{
try{
Scanner scr=new Scanner(System.in);
System.out.print("Enter a string:");
String myString=scr.nextLine();
myString=myString.toUpperCase();
System.out.println("string in upper case : "+myString);
}catch(Exception ex){
return;}
}
}
Output:
Enter a string:hello
string in upper case : HELLO