#12 Coding Challenge-2 Part 2 | Java Tutorial Series 📚 in Tamil | EMC Academy

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Welcome back to the EMC Academy Java Tutorial Series! In this video, we delve deeper into our coding challenge based on the concepts covered in our previous tutorials. Building upon the foundational knowledge from Part 1, Part 2 continues our exploration into Java programming with engaging challenges designed to reinforce your understanding and enhance your coding skills. Join us as we navigate through real-world scenarios, applying the concepts and techniques learned so far. Whether you're a beginner or an experienced coder looking to sharpen your Java skills, this video promises to be both informative and challenging. Stay tuned, and let's dive into the world of Java programming together! Don't forget to like, share, and subscribe for more content from EMC Academy. Happy coding! 🚀📝
    Java in Tamil.
    Join our 700K+ Instagram community
    www.instagram....

Комментарии • 90

  • @gayathri.m3480
    @gayathri.m3480 5 месяцев назад +67

    Question 3:
    import java.util.Scanner;
    class demo {
    public static void main(String[] args) {
    Scanner scan=new Scanner (System.in);
    String color=scan.nextLine();
    if(color.equals("red"))
    {
    System.out.print("Stop");
    }
    else if(color.equals("yellow"))
    {
    System.out.print("Get ready");
    }
    else if(color.equals("Green"))
    {
    System.out.print("Go");
    }
    }
    }

    • @moewin9619
      @moewin9619 4 месяца назад +9

      bro else if next else bro

    • @TechGamerTamil
      @TechGamerTamil 14 дней назад

      In public void statement there is a small error pls, check it bro

  • @aaditz47
    @aaditz47 3 месяца назад +7

    //Q3
    import java.util.Scanner;
    class exercise {
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String a = scan.nextLine();
    if(a.equals("red")){
    System.err.println("STOP");
    }
    else if(a.equals("yellow")){
    System.err.println("GET READY");
    }
    else{
    System.err.println("GO");
    }
    }
    }

  • @priyanethra1690
    @priyanethra1690 21 день назад +2

    Q3.
    import java.util.Scanner;
    class demo3 {
    public static void main(String args[]) {
    Scanner scan = new Scanner(System.in);
    System.out.println("What is the color of the traffic light?");
    String traffic_color = scan.nextLine();
    if (traffic_color.equals("red")) {
    System.out.print("Stop");
    }
    else if(traffic_color.equals("yellow")) {
    System.out.print("Get Ready");
    }
    else if(traffic_color.equals("green")) {
    System.out.print("Go");
    }
    else {
    System.out.print("Incorrect Input");
    }
    }

  • @navenshri7954
    @navenshri7954 14 дней назад +2

    bro your teaching easy to understand, thanks bro

  • @mdsalmankhan9339
    @mdsalmankhan9339 11 часов назад

    Ouestion no 3
    Import java.util.Scanner;
    public class Main {
    public static void main(String[] args) {
    Scanner colors=new Scanner(System.in);
    String color=colors.nextLine();
    if(color.equals("red")){
    System.out.println("stop");}
    else if (color.equals("yellow")){
    System.out.println("ready");}
    else{
    System.out.println("go"); }
    }
    }

  • @Blackpearl_motto
    @Blackpearl_motto 4 месяца назад +3

    Your teaching is easily understandable bro. Thank you so much ❤

  • @Charlsbinny
    @Charlsbinny 2 месяца назад +1

    Q3:
    import java.util.Scanner;
    class hello{
    public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    String light = scan.nextLine();
    if(light.equals("red")){
    System.out.print("stop");
    }
    else if(light.equals("yellow")){
    System.out.print("get ready");
    }
    else if(light.equals("green")){
    System.out.print("go");
    }
    }
    }

  • @leo__crush
    @leo__crush Месяц назад +1

    import java.util.Scanner;
    class exam {
    public static void main (String args[]){
    Scanner scan = new Scanner(System.in);
    String color = scan.nextLine();
    if(color.equals("red")){
    System.out.println("STOP");
    }
    else if(color.equals("yellow")){
    System.out.println("READY TO GO");
    }
    else if (color.equals("green")){
    System.out.println("GO");
    }
    }
    }

  • @mennamani
    @mennamani 5 месяцев назад +1

    rmbhaa usefull bro video continue pannungaaa pathilaa break pannanmaa

  • @highlights_mafia
    @highlights_mafia 5 месяцев назад +6

    public class q3 {
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    System.out.println("what is the color of the traffic light? (Enter only Red or Green or Yellow)");
    String clr = scan.nextLine().trim().toLowerCase();
    if(clr.equals("red")){
    System.out.println("Stop");
    }
    else if(clr.equals("yellow")){
    System.out.println("Get Ready");
    }
    else if(clr.equals("green")){
    System.out.println("Go");
    }
    else {
    System.out.println("invalid input!!");
    }
    }
    }

  • @subashinin4389
    @subashinin4389 2 месяца назад +1

    import java.lang.system;
    import java.util.scanner;
    Class traffic{
    public static void main (String arg[ ])
    { scanner obj=new scanner(system.in);
    String color=obj.nextLine();
    if(color.equals("red"))
    { System.out.print("Stop");
    }
    else if(color.equals("yellow"))
    { System.out.print("Get Ready");
    }
    else if(color.equals("green"))
    {
    System.out.print("Go")
    }
    }
    }

  • @kannancutz
    @kannancutz 10 дней назад +1

    Q2..
    If u enter the mark in terminal
    U must put another condition.y because
    Score 1 .. 21
    S2. 22
    S3 500
    S4 00
    S5 30
    Then this is also pass.
    So we correct code for mark condition

    • @tn_wolf_25
      @tn_wolf_25 2 дня назад

      Bro total 5score panra Nala athu percent 35 greater than pass varuthu so not problem

  • @blackcosta7008
    @blackcosta7008 День назад

    import java.util.Scanner;
    class Demo{
    public static void main(String[] args) {
    Scanner co = new Scanner(System.in);
    System.out.println("enter the color");
    String color = co.nextLine();
    if(color.equals("red")) {
    System.out.println("Stop"); }
    else if(color.equals("yelleow")) {
    System.out.println("Ready"); }
    else if(color.equals("green")) {
    System.out.println("Goo"); }
    }
    }

  • @rjtonz53
    @rjtonz53 15 дней назад

    package balaji;
    import java.util.Scanner;
    public class red {
    public static void main(String[] args) {

    Scanner scan=new Scanner(System.in);
    String a=scan.nextLine();
    if(a.equals ("red"))
    {
    System.out.print("stop");
    }
    else if(a.equals("yellow"))
    {
    System.out.println("wait");
    }

    else if (a.equals("green"))
    {
    System.out.println("go");

    }
    else
    {
    System.out.println("not defined");
    }
    }


    }

  • @r33epo_edits
    @r33epo_edits 3 месяца назад

    Anna videos podrathuku romba. Thanks

  • @Tholil-kalam
    @Tholil-kalam 5 месяцев назад +1

    Super and thanks bro ❤

  • @madhanarjun4767
    @madhanarjun4767 Месяц назад +1

    import java.util.Scanner;
    class hello{
    public static void main(String args[])
    {
    Scanner scan = new Scanner(System.in);
    String trafficLight = scan.nextLine();
    if(trafficLight.equals("red"))
    {
    System.out.print("Stop");
    }
    else if(trafficLight.equals("yellow"))
    {
    System.out.print("Get Ready");
    }
    else if(trafficLight.equals("green"))
    {
    System.out.print("Go");
    }
    }
    }

  • @manojk3890
    @manojk3890 4 дня назад +1

    Q3 answer:
    import java.util.Scanner;
    public class Learning{
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String color = scan.nextLine();

    if (color.equals("red") || color.equals("Red")){
    System.out.println("color is " + color + " so stop");
    } else if (color.equals("green")){
    System.out.println("color is " + color + " so go");
    }else if (color.equals("yellow")){
    System.out.println("color is " + color + " so get ready");
    }else {
    System.out.println("invalid color");
    }scan.close();
    }}

    • @sugithraj9203
      @sugithraj9203 3 дня назад

      why we have to give .nextLine insted of .nextInt ??

    • @Vignesh-lc7ir
      @Vignesh-lc7ir 2 дня назад

      @@sugithraj9203 because we are getting a string from the user
      if for getting integer from the use then we have to use .nextInt

    • @manojk3890
      @manojk3890 2 часа назад

      @@sugithraj9203 for string, use nextLine
      for int, use nextInt
      fro double, use nextDouble
      like wise, based on datatype, you have to
      use accordingly

  • @jpd_dpa
    @jpd_dpa 2 месяца назад

    # Question 3 :
    import java.util.Scanner;
    class looping{
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    String color = scan.nextLine();
    if(color.equals("red") ){
    System.out.println("STOP");
    }
    else if(color.equals("Yellow") ){
    System.out.println("Get ready");
    }
    else if(color.equals("Green") ){
    System.out.println("Go");
    }
    }
    }

  • @mohamedmujahith9038
    @mohamedmujahith9038 4 месяца назад +1

    Bro stringa vachi oru example podunga bro user kitta input vangramathiri

  • @StephenV-wz4sk
    @StephenV-wz4sk 10 дней назад

    import java.util.Scanner;
    class hello {
    public static void main(String[] args) {
    Scanner devil = new Scanner(System.in);
    String coler = devil.nextLine();
    if(coler.equals("red"))
    {
    System.out.println("Stop.");
    }
    if(coler.equals("yellow"))
    {
    System.out.println("Get Ready.");
    }
    if(coler.equals("green"))
    {
    System.out.println("Go.");
    }

    }
    }

  • @user-gk9oq4vh2o
    @user-gk9oq4vh2o 11 дней назад

    import java.util.Scanner;
    class Main
    {
    public static void main(String[] args)
    {
    Scanner traffic = new Scanner(System.in);
    String colour = traffic.nextLine();
    if(colour.equals("red"))
    {
    System.out.println("STOP");
    }
    else if(colour.equals("yellow"))
    {
    System.out.println("Get Ready");
    }
    else if(colour.equals("Green"))
    {
    System.out.println("GO");
    }
    }
    }

  • @monilatha5129
    @monilatha5129 5 месяцев назад

    Could you please teach me about the MVC (Model-View-Controller) and MVVM (Model-View-ViewModel) patterns in Flutter or any other common

  • @fmaaishfaiz6535
    @fmaaishfaiz6535 Месяц назад

    thank you bro

  • @aktharhanfi6053
    @aktharhanfi6053 Месяц назад

    public class hello {
    public static void main(String[] args){
    System.out.println("Enter five subject Marks:");
    Scanner m=new Scanner(System.in);
    String color=m.nextLine();
    if(color.equals("red")){
    System.out.print("stop");
    }
    else if (color.equals("yellow"))
    {
    System.out.print("ready");
    }
    else if (color.equals("green"))
    {
    System.out.print("go");
    }
    }

  • @arunraj9732
    @arunraj9732 4 месяца назад

    package Exercise_EMC;
    public class Exercise13 {
    public static void main(String args[]) {
    // nested if
    int score = 70;
    if (score < 50) { // less than
    System.out.println("You need to improve");
    } else if(score == 50 && score

  • @SeshadriD-zr9qg
    @SeshadriD-zr9qg 4 месяца назад +2

    Hello bro in this video i have understood all the things but from 15:00 min while typing Sys.out.print statement it showing x or s symbol what it indicates bro like System.out.Println(x:"Enter your salary: ");. Thanks in advance

  • @KarthikM-d3b
    @KarthikM-d3b Месяц назад

    Complete the traffic signal program bro🥳✨

  • @Sathya2024
    @Sathya2024 3 месяца назад +2

    If( salary>=20000 && age

    • @Hiuswo
      @Hiuswo 2 месяца назад

      Ama bro avaru en or use panaru thrla

    • @blessymelba1803
      @blessymelba1803 27 дней назад

      bro andha anna user kitta vanguna input ku || operator um use panlam and && potukalam bro

  • @u.karthikeyan1873
    @u.karthikeyan1873 10 дней назад

    mport java.util.Scanner;
    class light{
    public static void main(String[]args){
    Scanner traffic = new Scanner(System.in);
    String s= traffic.next();
    String s1= "red";
    String s2= "yellow";
    String s3= "green";
    if(s1.equals(s)){
    System.out.println("Stop");
    }
    else if(s2.equals(s)){
    System.out.println("Ready");
    }
    else if(s3.equals(s)){
    System.out.println("Go");
    }
    else{
    System.out.println("Invalid input");
    }
    }
    }

  • @KavyaMahendrakumar
    @KavyaMahendrakumar 5 месяцев назад +1

    What is difference between Devops and full stack developer please answer bro

  • @SasiKumar-dp6fn
    @SasiKumar-dp6fn 25 дней назад

    Bro what is the use of those "s:" and "x:" in the print statements...?
    Can anyone tell me

  • @SIVA_BSc
    @SIVA_BSc 5 месяцев назад

    Congratulations for 6 lack subscribers

  • @anooj419
    @anooj419 5 месяцев назад +6

    AI ய பற்றி சொல்லுங்க. இதால IT படிச்சவங்கட வேல பாதிக்கபடுமா?

  • @arunraj9732
    @arunraj9732 4 месяца назад

    package Exercise_EMC;
    import java.util.Scanner;
    public class Exercise15 {
    public static void main(String args[]){
    Scanner scan = new Scanner(System.in);
    String color = scan.nextLine();
    if(color.equals("red")){
    System.out.println("Stop");
    } else if(color.equals("yellow")){
    System.out.println("Get Ready");
    } else {
    System.out.print("Go");
    }
    scan.close();
    }
    }

  • @nanthakumaranandan3560
    @nanthakumaranandan3560 2 месяца назад

    q3.
    import java.util.Scanner;
    class hello{
    public static void main(String argd[])
    {
    Scanner scan = new Scanner(System.in);

    String color = scan.nextLine();

    if (color.equals("red"))
    {
    System.out.println("Stop.");
    }
    else if (color.equals("yellow"))
    {
    System.out.println("Get Ready.");
    }
    else if (color.equals("green"))
    {
    System.out.println("Go.");
    }
    }
    }

  • @ganeshsaravanan4079
    @ganeshsaravanan4079 21 день назад

    Question 4:
    import java.util.Scanner;
    class Testing7{
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter Your Salary:");
    int salary = scan.nextInt();
    System.out.println("Enter Your Age:");
    int age = scan.nextInt();
    if(salary>=20000 || age

  • @ezhil1784
    @ezhil1784 5 месяцев назад

    Completed...

  • @smartvikram4081
    @smartvikram4081 Месяц назад

    Done the 3program

  • @vigneshwaransuriyamoorthy904
    @vigneshwaransuriyamoorthy904 2 месяца назад

    import java.util.Scanner;
    public class traf{
    public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    System.out.println("What the color of the Traffic light:");
    String a = scan.nextLine();
    String l1 = "Red";
    String l2 = "Green";
    String l3 = "Yellow";
    if(a.equals(l1)){
    System.out.println("Stop");
    }
    else if(a.equals(l2)){
    System.out.print("Go");
    }
    else{
    System.out.print("Steady");
    }
    }
    }

  • @rmipurplt1373
    @rmipurplt1373 3 месяца назад

    import java.util.Scanner;
    public class Main
    {
    public static void main(String [] args)
    {
    Scanner scan=new Scanner(System.in);
    String color=scan.nextLine();
    if(color.equals("red"))
    {
    System.out.println("STOP");
    }
    else if(color.equals("yellow"))
    {
    System.out.println("READY");
    }
    else
    {
    System.out.print("GO");
    }
    }
    }

  • @user-wh2co3yz4u
    @user-wh2co3yz4u 4 месяца назад +1

    bro question la 20000 thousand or above eligible but neega 19k podinga elgible varuthu

  • @aandrewcemonm1961
    @aandrewcemonm1961 Месяц назад

    import java.util.Scanner;
    class traffic{
    public static void main(String[] args)
    {
    Scanner scan = new Scanner(System.in);
    {
    System.out.println("Color");
    }
    String color = scan.nextLine();
    if(color.equals("red"))
    {
    System.out.print("Stop");
    }
    if(color.equals("yellow"))
    {
    System.out.print("Get ready");
    }
    if(color.equals("green"))
    {
    System.out.print("Go");
    }
    }
    }

  • @hasanfarees7763
    @hasanfarees7763 5 месяцев назад

    Machine learning pathi oru video poduga bro

  • @DevendrenVelmurugan
    @DevendrenVelmurugan Месяц назад

    Hi Bro i think this is the actual code for Q4:
    import java.util.Scanner;
    class Salary
    {
    public static void main(String args[])
    {
    Scanner s=new Scanner(System.in);
    System.out.println("Enter Your Salary");
    int Salary=s.nextInt();
    System.out.println("Enter Your age");
    int Age=s.nextInt();
    if(Salary>=20000&&Age

  • @gamescrack9567
    @gamescrack9567 3 месяца назад +1

    Aiml pathi solunga annow

  • @vasigara9051
    @vasigara9051 22 дня назад

    import java.util.Scanner;
    class hello{
    public static void main(String arg[])
    {
    Scanner scan = new Scanner(System.in);
    String colour = scan.nextLine();
    String c1 = new String("red");
    String c2 = new String("yellow");
    String c3 = new String("green");
    if(colour.equals(c1))
    {
    System.out.print("stop");
    }
    if(colour.equals(c2))
    {
    System.out.print("get ready");
    }
    if(colour.equals(c3))
    {
    System.out.print("go");
    }
    }
    }

  • @devdeva8949
    @devdeva8949 Месяц назад

    Anna 1st problem ku
    (4971)
    Ipdiyum kudukalam la
    Ila ithu thappa sollunga bro

  • @mohamedarsath4455
    @mohamedarsath4455 Месяц назад

    import java.util.*;
    public class Main
    {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String a=sc.next();
    if(a.equals("red")){
    System.out.print("Stop");
    }
    else if(a.equals("orange")){
    System.out.println("ready");
    }
    else if(a.equals("green")){
    System.out.print("Go");
    }
    }
    }

  • @kaleeswarinagalingam6649
    @kaleeswarinagalingam6649 2 месяца назад

    Code for Question3:
    import java.util.Scanner;
    public class codechallenge6 {
    public static void main(String[] args) {
    System.out.println("Enter the Color red/green/yellow
    ");
    Scanner scan =new Scanner(System.in);
    String color=scan.nextLine();

    if (color.equalsIgnoreCase("red"))
    {
    System.out.println("Stop");
    }
    else if(color.equalsIgnoreCase("yellow"))
    {
    System.out.println("Get Ready");
    }
    else if(color.equalsIgnoreCase("Green"))
    {
    System.out.println("Go");
    }
    else
    {
    System.out.println("Invalid input");
    }

    }
    }

  • @MohamedAslam-sm7xm
    @MohamedAslam-sm7xm 4 месяца назад

    import java.util.Scanner;
    public class Coding_Challenge {
    public static void main(String[] args) {
    Scanner input = new Scanner (System.in);
    System.out.println("What is the colour of trafic light?");
    String Colour = input.next();

    if(Colour.equals("red")) {
    System.out.println("Stop");
    }

    else if(Colour.equals("yellow")) {
    System.out.println("Get Ready");
    }

    else {
    System.out.println("Go!!!");
    }
    }
    }

  • @mohanakanna.r6448
    @mohanakanna.r6448 2 месяца назад

    import java.util.Scanner;
    public class demo2 {
    public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String color = sc.nextLine();
    if(color.toLowerCase().equals("red")){
    System.out.println("Stop");
    }
    else if(color.toLowerCase().equals("green")){
    System.out.println("Go");
    }
    else if(color.toLowerCase().equals("yellow")){
    System.out.println("Get Ready");
    }
    sc.close();
    }
    }

  • @prabhuudayakumar5660
    @prabhuudayakumar5660 Месяц назад

    import java.util.Scanner;
    class q1 {
    public static void main(String args[])
    {
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter the salary");
    int salary = scan.nextInt();
    System.out.println("Enter the age");
    int age = scan.nextInt();
    if (salary>= 20000 || age

  • @sarathym
    @sarathym Месяц назад

    import java.util.Scanner;
    public class challenge
    {
    public static void main(String args[])
    {
    Scanner ps=new Scanner(System.in);
    System.out.println("Enter your salary:");
    int salary=ps.nextInt();
    System.out.println("Enter your age:");
    int age=ps.nextInt();
    if(salary>=20000||age

  • @tn_wolf_25
    @tn_wolf_25 2 дня назад

    Q4 else question la solva illa

  • @game--143
    @game--143 5 месяцев назад

    bro python coding challenge podunga bro

  • @user-bz9fv1nv4m
    @user-bz9fv1nv4m Месяц назад

    import java.util.Scanner;
    public class Main {
    public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt();
    int c = scan.nextInt();
    int d = scan.nextInt();
    int e = scan.nextInt();
    int sum = a+b+c+d+e;
    int avg = sum/5;
    if(avg

  • @DevendrenVelmurugan
    @DevendrenVelmurugan Месяц назад

    bro qn 4 la salary &age requirement meet panalana not eligible nu print aganum thana athan qn ithu doubt bro

  • @selvasiva7
    @selvasiva7 5 месяцев назад

    ♥️

  • @nvsbflims4624
    @nvsbflims4624 3 месяца назад +2

    Bro completed the task is this correct ans
    import java.lang.System;
    import java.util.Scanner;
    class one {
    public static void main(String[] args) {
    Scanner nandha = new Scanner(System.in);
    String traffic_light = nandha.nextLine();
    if (traffic_light.equals("red")){
    System.out.println("Stop");
    }
    else if(traffic_light.equals("yellow")){
    System.out.println("Get Ready");
    }
    else if(traffic_light.equals("green")){
    System.out.println("Go");
    }
    }
    }

  • @manjulap7190
    @manjulap7190 Месяц назад

    Bro... 1st prblm. 50=

  • @faizal2634
    @faizal2634 4 месяца назад

    enna extension bro use pandringa

  • @saranffplayer6004
    @saranffplayer6004 5 месяцев назад +1

    Bro na 12th leave la irukan nxt wave la full stack developer kathuka poren 1,00,000 kekuranga worth ah bro

    • @ezhil1784
      @ezhil1784 5 месяцев назад

      Not. Worth

    • @myselfu1115
      @myselfu1115 5 месяцев назад

      Vendam bro shiksha technology Chennai la intern pannunga or payilagam la course join pannunga

  • @arunraj9732
    @arunraj9732 4 месяца назад

    package Exercise_EMC;
    import java.util.Scanner;
    public class Exercise14 {
    public static void main(String args[]) {
    Scanner scan = new Scanner(System.in);
    int mark1 = scan.nextInt();
    int mark2 = scan.nextInt();
    int mark3 = scan.nextInt();
    int mark4 = scan.nextInt();
    int mark5 = scan.nextInt();
    int totalmark = mark1 + mark2 + mark3 + mark4 + mark5;
    int average = totalmark / 5;
    if (average < 35) {
    System.out.println("Additional class is required");
    } else {
    System.out.print("You are good to go");
    }
    scan.close();
    }
    }

  • @Praga6802
    @Praga6802 Месяц назад

    import java.util.Scanner;
    class loan{
    public static void main(String args[] )
    {
    Scanner scan=new Scanner(System.in);
    System.out.println("Enter your salary:");
    int sal=scan.nextInt();
    System.out.println("Enter your age:");
    int age=scan.nextInt();
    if(sal>=20000 || age=20000)
    {
    System.out.println("Eligible for loan based on your salary");
    }
    else
    {
    System.out.println("Eligible for loan based on your age");
    }
    System.out.println("Enter your required loan amount");
    int loan=scan.nextInt();
    if(loan

  • @vigneshwaransuriyamoorthy904
    @vigneshwaransuriyamoorthy904 2 месяца назад

    import java.util.Scanner;
    public class loan{
    public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    System.out.println("What is your salary:");
    int a = scan.nextInt();
    System.out.println("What is your age:");
    int b = scan.nextInt();
    System.out.print("what is your loan amount:");
    int c = scan.nextInt();
    if((a>=20000) || (b

  • @SriniVasan-w8v
    @SriniVasan-w8v Месяц назад

    import java.io.*;
    import java.util.Scanner;
    public class ifelseif
    {
    public static void main (String[] args)
    {
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter the traffic signal colour");
    String r= scan.nextLine();
    String y= scan.nextLine();
    String g= scan.nextLine();
    if((r.equals("red"))||(r.equals("RED"))||(r.equals("Red")))
    {
    System.out.println("STOP..");
    }
    if((y.equals("yellow"))||(y.equals("YELLOW"))||(y.equals("Yellow")))
    {
    System.out.println("GET READY..");
    }
    if((g.equals("green"))||(g.equals("GREEN"))||(g.equals("Green")))
    {
    System.out.println("GO..");
    }
    }
    }

  • @arhiarhasudhanselvaraj808
    @arhiarhasudhanselvaraj808 Месяц назад

    Question 3:
    import java.util.Scanner;
    class QA5{
    public static void main(String args[])
    {
    Scanner scan= new Scanner(System.in);
    String traffic=scan.nextLine();
    if(traffic.equals("red"))
    {
    System.out.print("stop");
    }
    else if(traffic.equals("yellow"))
    {
    System.out.print("get ready");
    }
    else if(traffic.equals("green"))
    {
    System.out.print("go");
    }
    }
    }

  • @Tholil-kalam
    @Tholil-kalam 5 месяцев назад

    Super and thanks bro ❤

  • @comphy123
    @comphy123 Месяц назад

    import java.util.Scanner;
    class traffic{
    public static void main(String args[]){
    Scanner jeys = new Scanner(System.in);
    String light = jeys.nextLine();
    if(light.equals("green")){
    System.out.print("Go");
    }
    else if (light.equals("yellow")){
    System.out.print("wait");
    }
    else if(light.equals("red")){
    System.out.print("stop");
    }
    }
    }

  • @KeerthiKeerthi-rg7dv
    @KeerthiKeerthi-rg7dv 2 месяца назад

    import java.util.Scanner;
    class Main {
    public static void main(String[] args) {
    Scanner sc= new Scanner(System.in);
    String colour=sc.nextLine();
    {
    if(colour.equals("red"))
    {
    System.out.println("stop");
    }
    else if(colour.equals("yellow"))
    {
    System.out.println("get ready");
    }
    else if(colour.equals("green"))
    {
    System.out.println("go");
    }
    }
    }
    }