Add Three Numbers
Kick Start
Add Three Numbers
Problem Statement
Accept three numbers and print their sum.
Example Input/Output 1
Input
5 2 4
Output
11
Example Input/Output 2
Input
25 15 10
Output
50
Note: Max Execution Time Limit: 4000 millisecs
Solution
Programming Language: C Language
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d",a+b+c); }
//Published By PKJCODERS
Programming Language: C++ Language
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; cout << a+b+c; }
//Published By PKJCODERS
Programming Language: Java Language
import java.util.*; public class Hello { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.out.print(a+b+c); } }
//Published By PKJCODERS
Programming Language: Python 3 Language
a,b,c=map(int,input().split()) print(a+b+c)
#Published By PKJCODERS
(Note: Incase If the code doesn't Pass the output kindly comment us with
your feedback to help us improvise.)
Comments