You can not claim this because most times credit card issuers will be able to match purchases and charges to your location, ex stores around you, online purchases sent to your location.
Answer:
// Here is SammysRentalPrice.java file
// import package
import java.util.*;
// class definition
class SammysRentalPrice
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// object to read value from user
Scanner scr=new Scanner(System.in);
// ask to enter rented minutes
System.out.print("enter rented minutes: ");
// read minutes
int min=scr.nextInt();
// find hours
int hour=min/60;
//reamining minutes
min=min%60;
// total cost
int cost=hour*40+min*1;
// print cost
System.out.println("total cost is: "+cost);
}catch(Exception ex){
return;}
}
}
Explanation:
Read rented minutes from user and assign it to variable "min".Find the hours from minutes and then update the remaining minutes.After this multiply hours with 40 and remaining minutes with 1.Sum them and this will be the cost of rented a sports equipment.
Output:
enter rented minutes: 145
total cost is: 105
Answer:
string words[6];
words[0]="humming";
words[1]=words[0];
Explanation:
The above statement declares an array of size 6 which can store elements of type string or word. Then I have initialized the first and second elements with the word humming and the rest of the places in the arrays are uninitialized.
You have to include the header file string so that this array could work otherwise it will not.