convert codings to software

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rampraveen
    New Member
    • Apr 2010
    • 37

    convert codings to software

    I am creating one small C program which is used for performing addition and some mathematical calculations. My doubt is if I want to calculate any thing in that program first I have to compile that program, then i can able to get the answer. Without compiling can I give that input numbers? If we are opening calculator in computer(window s xp) first we gave the input numbers then it shows the corresponding output. So like that can I do something similar in C?
    Last edited by Niheel; May 10 '10, 05:55 PM. Reason: grammar, punctuation, unclear language
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You can do that by passing command-line arguments to your C program.

    For example, consider this (MyCalc is your calculator executable):

    C:\> MyCalc.exe multiply 2 5
    >>> 10

    Here multiply, 2, and 5 are command-line arguments, and your program functions according to them.

    See this google link for informatin on the subject.

    Comment

    Working...