Multiply Three Numbers

Accept three numbers and print their product.

Example Input/Output 1:
Input:
2 5 10

Output:
100

Example Input/Output 2:
Input:
6 3 7

Output:
126

Python

X, Y, Z = map(int, input().split())
print(X*Y*Z) 

Java

import java.util.*;
public class Hello {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        int num3 = sc.nextInt();
        System.out.print(num1 * num2 * num3);
    }
}

C

#include <stdlib.h>
#include  <stdio.h>
int main()
{
    int X, Y, Z;
    scanf("%d %d %d", &X, &Y, &Z);
    printf("%d", X*Y*Z);
    return 0;
}

C++

#include <iostream>
using namespace std;
int main()
{
    int X, Y, Z;
    cin >> X >> Y >> Z;
    cout << X*Y*Z;
    return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

More posts. You may also be interested in.