You are on page 1of 6

Problem1

package masrur1;

import java.util.Scanner;

public class welcome3 {

public static void main(String[] args) {

// TODO Auto-generated method stub

Scanner input=new Scanner(System.in);

System.out.println("Enter your First Name:");

String firstName=input.nextLine();

System.out.println("Enter your Last Name:");

String lastName=input.nextLine();

System.out.println("Enter your Phone number:");

String phoneNumber=input.nextLine();

String fullName = firstName + " " + " " + lastName;

String message=String.format("\n\t\t\tCongrats %s!!\n\t\t\tYour email is


%s", fullName,"."+ "@northsouth.edu.com");

System.out.print(message);

}
Problem 2
package masrur1;

import java.util.Scanner;

public class welcome2 {

public static void main(String[] args) {

// TODO Auto-generated method stub

System.out.println("\t\t\t\t\t\t\t WHO APPRECIATES YOU???\n ");

Scanner input=new Scanner(System.in);

System.out.println("Enter your first name:");

String firstname=input.nextLine();

System.out.println("Enter your last name:");

String lastname=input.nextLine();

String message=String.format("\n\t\t\tCongrats %s %s!! NO ONE APPRECIATES


YOU (no one appreciates a looser)<3 ",firstname,lastname);

System.out.print(message);

}
Problem 3
Problem 4
Problem 5
Problem 6

You might also like