[Show all top banners]

Dreamer
Replies to this thread:

More by Dreamer
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 for computer experts
[VIEWED 2993 TIMES]
SAVE! for ease of future access.
Posted on 06-12-06 11:33 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I was tryin to make a very simple calculator. Just for addition and subtarction, nothing fancy. But have no knowledge on how to make a sotware.

I googled and learnt that you need to write some kind of codes. No problem, I will try to google that too. But where do I write the code? Is it wordpad or notepad or do I need some special program?

Thanks in advance.
 
Posted on 06-12-06 11:38 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Is this for fun or a class project? Windows comes with a built in calculator...
 
Posted on 06-12-06 11:42 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

There are scores of ways to do this. If you are looking for a simple windows like calculator, you can try coding in Java, if you know the language. Visual Basic is real neat, and I love the interface and ease of use. You can also use Visual C++ to do C coding, but it's much harder, and requires a lot more knowledge of Windows programming.

With all this, the best solution I have seen for you is Java, with it's wonderful GUI support.

If all else fails, just try using C code (you can use Notepad or any pad you want, not the ladies version though :) !) You will need to download the C compiler to do this. Google for TC compiler for example.

Here is an example (out of millions) to build a simple calculator in Java.
http://dmdoc.object-tools.com/dmBuilder/tutorial/java/calculator/index.html
 
Posted on 06-12-06 11:51 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

thx sangitsaukin for prompt reply. i will have to download tc compiler it seems coz all i know about java is there was a big earthquake there about few weeks back.

no shiv, its not for class project. i just want to expand my knowledge of compuyter beyond word and excel
 
Posted on 06-12-06 11:57 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

--Here is the code for plus and minus.
--You can run it on sql server query analyzer

CREATE FUNCTION Calculator
(@var1 INT,
@var2 INT,
@op VARCHAR(1))
RETURNS INT
AS
BEGIN
DECLARE
@result INT
IF (@op = '+')
SELECT @result = @var1 + @var2
IF (@op = '-')
SELECT @result = @var1 - @var2
RETURN (@result)
END

SELECT dbo.Calculator(10,2,'-')
 
Posted on 06-12-06 3:26 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

DREAMER:
if you are just starting with programming, and your knowledge is limited to word,excel etc., then the best way to start is not with programming a calculator software but just a simple one.

I suggest using VBA (already available in your Excel and word).

ask for details if you r interested.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 7 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Why Americans reverse park?
whats wrong living with your parents ?
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters