Create a program that will only require the programmer to change the variable values in order to create a dynamic sentence using the sentence sample Output.
BOLD words indicates a variable.
Sample Output:
-----------------------------------------------------------------------------------
Hi my name is Ryan Christian Nono.
I am 25 Years Old.
I love reading books and watching movies.
My favorite color is `Black` because the sky is white.
I love Programming 2 because of my Instructor.
class App {
public static void main(String[] args) {
String name = "Ryan Christian Nono";
int years = 25;
String reading = "books";
String watching = "movies";
String favoriteColor = "Black";
String skeyColor = "white";
String programming = "Programming 2";
System.out.printf("Hi my name is %s.\n", name);
System.out.printf("I am %d Years Old.\n", years);
System.out.printf("I love reading %s and watching %s.\n", reading, watching);
System.out.printf("My favorite color is '%s' because the sky is %s.\n", favoriteColor,skeyColor);
System.out.printf("I love %s because of my Instructor.\n", programming);
}
}
Comments
Leave a comment