Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Activity week 4 intro to java CCS1E
- *
- */
- public class main {
- public static void main(String[] args) {
- // primitive data types
- int Senna = 20;
- short teemo = 1;
- long cassiopeia = 5;
- double varus = 2.54;
- float yasuo = 5.454f;
- int feeder = 5;
- // pseudocodes and flowcharts
- /**
- * My personal based code flowchart design:
- * https://bit.ly/3e2rlSc
- */
- String correct = "Correct";
- String wrong = "Wrong";
- String equal = "Equal";
- String notequal = "Not Equal";
- String nh = "Nothing Happened";
- if (Senna < teemo) {
- System.out.println(correct);
- // prints correct if the senna is less than teemo
- } else {
- System.out.println(wrong);
- // prints wrong because senna is larger (20) than teemo (1)
- // output should be wrong
- }
- if (cassiopeia == varus) {
- System.out.println(equal);
- }
- if (cassiopeia != feeder) {
- System.out.println(notequal);
- }
- // output will be nothing happened becuase both are false
- else {
- System.out.println(nh);
- }
- }
- }
- // Submitted by : John Carl Quieta
- // October 4, 2022
Add Comment
Please, Sign In to add comment