Tuesday, 17 May 2016

Task
Given an integer, , perform the following conditional actions:

  • If is odd, print
  • If is even and in the inclusive range of to , print
  • If is even and in the inclusive range of to , print
  • If is even and greater than , print
Complete the stub code provided in your editor to print whether or not is weird.


Monday, 16 May 2016

Task

                      The variables =4,d= 4.0, and  ="Javarenian " are declared and initialized . You must declare variables: one of type int, one of type double, and one of type String. Then you must read lines of input from stdin and initialize your variables. Finally, you must use the operator to perform the following operations:
  • Print the sum of plus your int variable on a new line.
  • Print the sum of plus your double variable to a scale of one decimal place on a new line.
  • Concatenate with the string you read as input and print the result on a new line.  


Input Format

              The first line contains an integer, .
              The second line contains a double, .
              The third line contains a string, .

Output Format

                    Print the sum of both integers on the first line, the sum of both doubles on the second line, and then the two concatenated strings on the third line.