Thursday, April 30, 2009

Input from Command


Problem Statement:
Take input from command prompt.

Language:
C and Java

Platform:
Command Prompt

Command:
[Program] [Input]

Expected Input:
[Input] : Any Message
Note: message is always separated by Space!

Expected Output:
Message 1: [Input 1]
Message 2: [Input 2]
...

Example:
Interface in C:
C:\Program> ./read_cmd.exe reading from cmd
Interface in Java:
C:\Program> java read_cmd reading from cmd

Output (Same for both C and Java):
Message 1: reading
Message 2: from
Message 3: cmd

Hello World


Problem Statement:
Print "Hello World" on screen.

Language:
C and Java

Platform:
Command Prompt

Command:
[Program]

Expected Input:
None

Expected Output:
Hello World

Example:
Interface in C:
C:\Program> ./hello_world.exe
Interface in Java:
C:\Program> java hello_world

Output (Same for both C and Java):
Hello World

Fundamentals of Computing in IITK

Course website of Java Programming for 1st year BTech Students in IIT Kanpur.


You can find lectures, tutorials and assignment in proper sequence for learning.

Welcome

Dear Readers,

Programming is simpler then you really think... But in case, if you think that programming is not as simple as I think, then you are at right place. If you want to learn or revise programming, then this blog may help you. Here we will be posting the programming task and you will find solutions in the comment sections as it will be solved by us. This is because I am making this blog by writing each program one by one and revising my programming skill as well.

Good Luck.