Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Question1 {
- public static void main(String args[]){
- Scanner spamDetails = new Scanner(System.in);
- System.out.println("Enter full name:");
- String firstName = spamDetails.next();
- String lastName = spamDetails.next();
- spamDetails.nextLine();
- System.out.println("Enter sum of money in USD:");
- int amountOfMoney = spamDetails.nextInt();
- spamDetails.nextLine();
- System.out.println("Enter country name:");
- String cntryName = spamDetails.nextLine();
- //Variable to calculate 15% of money.
- int fifteenPercent = (int) (0.15 * amountOfMoney);
- //Printing the output message.
- System.out.println("Dearest "+ firstName);
- System.out.println("It is with a heavy heart that I inform you of the death of my father,");
- System.out.println("General Fayk " + lastName + ", your long lost relative from Mapsfostol.");
- System.out.println("My father left the sum of " + amountOfMoney + "USD for us, your distant cousins.");
- System.out.println("Unfortunately, we cannot access the money as it is in a bank in " + cntryName + ".");
- System.out.println("I desperately need your assistance to access this money.");
- System.out.println("I will even pay you generously, 15% of the amount - " + fifteenPercent + "USD,");
- System.out.println("for your help. Please get in touch with me at this email address asap.");
- System.out.println("Yours sincerely");
- System.out.println("Arnrial " + lastName);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement