Sunday, June 19, 2022

 Simple Sum


Problem Statement
Given three integers A, B, and C, your task is to print the sum of these three integers.


import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework

// don't change the name of this class
// you can add inner classes if needed
class Main {
    public static void main (String[] args) {
                      // Your code here
                      Scanner sc=new Scanner(System.in);
                      int A = sc.nextInt();
                      int B= sc.nextInt();
                      int C = sc.nextInt();
                      System.out.println(A+B+C);
    }
}

No comments:

Post a Comment

ads vert

Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody

  Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody < table >      < thead >    ...