Sunday, May 1, 2016

URI Online Judge Solution 1078 Multiplication Table

Main link : https://www.urionlinejudge.com.br/judge/en/problems/view/1078


URI Online Judge | 1078

Multiplication Table

Adapted by Neilor Tonin, URI  Brazil
Timelimit: 1
Read an integer N (2 < N < 1000). Print the multiplication table of N.
1 x N = N      2 x N = 2N        ...       10 x N = 10N  

Input

The input is an integer (1 < < 1000).

Output

Print the multiplication table of N., like the following example.
Input SampleOutput Sample
1401 x 140 = 140
2 x 140 = 280
3 x 140 = 420
4 x 140 = 560
5 x 140 = 700
6 x 140 = 840
7 x 140 = 980
8 x 140 = 1120
9 x 140 = 1260
10 x 140 = 1400


URI Online Judge Solution 1078 in Java 



import java.io.IOException;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws IOException {

    int N;
Scanner input=new Scanner(System.in);
N =input.nextInt();
for (int i = 1; i <= 10; i++) {
System.out.print(i+" x "+N+" = "+(i*N)+"\n");
}
    }

}




No comments:
Write comments

To know more about the problem, give us your valuable commment. We'll try to help you. Thanks

All rights reserved ©2016 -URI ONLINE JUDGE SOLUTION | Developed by Maniruzzaman Akash

© 2016 URI ONLINE JUDGE SOLUTION. Developed by Maniruzzaman Akash | Distributed By Gooyaabi Templates
Powered by Blogger.