input output

from where i need to take input and where i need to print output

@kalpesh2704 : You need to read input from standard input and print your answer on standard output . No file handling etc .

1 Like

@kalpesh2704 : you can use scanf() as taking input for C/C++ program and for output you can use printf(). for Java you can use BufferedReader with System.in as input stream and System.out.println() for output.

4 Likes

C: use scanf();
c++: use cin<<
java use Buffered reader
printing output depends on patter how u want a output check any sample solution to see how to print output in specified manner.

3 Likes

cin takes more timeā€¦u can use scanf() as well in C++.

1 Like