calculator program with memory function

V

Vijaykumar Dave

Is there anyone have calculator program with memory function ?

I need it for submission of assignment.

Vijaykumar Dave
 
C

Clever Monkey

Vijaykumar said:
Is there anyone have calculator program with memory function ?

I need it for submission of assignment.
Better get started, then. Should only take you a few hours.
 
F

Flash Gordon

Vijaykumar Dave wrote, On 26/04/07 21:22:
Is there anyone have calculator program with memory function ?

Yes thanks. One came with Windows and another with Linux.
I need it for submission of assignment.

Then I suggest you try to write one.

It is not in the interests of professional programmers or students
hoping to become professional programmers to help you to cheat. The
students might later be competing with you for a job, and the
professional programmers might end up having to sort out the mess you
would create if you passed and got a job without knowing how to program.
 
M

Martin Ambuhl

Vijaykumar said:
Is there anyone have calculator program with memory function ?

Yes, and the source for several of these is easily found with a simple
web search.

I need it for submission of assignment.

With all due respect, I hope your teacher spots your cheating and throws
your ass out of school.
 
E

Eric Sosman

Martin Ambuhl wrote On 04/26/07 16:44,:
Yes, and the source for several of these is easily found with a simple
web search.





With all due respect, I hope your teacher spots your cheating and throws
your ass out of school.

Too much respect: he's due lots less.
 
I

Ian Collins

Martin said:
With all due respect, I hope your teacher spots your cheating and throws
your ass out of school.
Thanks for the image, as a non-US English speaker, I have a picture of
his innocent donkey being expelled form school :)
 
O

osmium

Vijaykumar Dave said:
Is there anyone have calculator program with memory function ?

I need it for submission of assignment.

Write a calculator that only adds two numbers. Then modify it to do
subtract as well. Add multiply and divide. Add memory. Turn it in for
credit. If you get stuck along the way, post what you have so far. We
don't know who you are so there is no reason to be embarrassed by what you
have.
 
J

Joe Estock

Vijaykumar said:
Is there anyone have calculator program with memory function ?

I need it for submission of assignment.

Vijaykumar Dave

Sure! Here you go. This works perfectly for me and I think you'll find
the code not only very clear to read but quite informative as well!

#include <stdio.h>
#include <stdlib.h>

#define A(x, y) (x) + (y)
#define S(x, y) (x) - (y)
#define M(x, y) (x) * (y)
#define D(x, y) (x) / (y)

const char mem[] = /* Our "memory" */
{
100, 111, 121, 111, 117, 114,
111, 119, 110, 104, 111, 109,
101, 119, 111, 114, 107, 107,
116, 104, 120, 98, 121, 101
};

int main(int argc, char **argv)
{
int i;

for (i = 0; i < sizeof(mem); i += 2)
{
printf("%2.2s: %d + %d = %d\n", &mem,
mem, mem[i + 1], A(mem, mem[i + 1]));
printf("%2.2s: %d - %d = %d\n", &mem,
mem, mem[i + 1], S(mem, mem[i + 1]));
printf("%2.2s: %d * %d = %d\n", &mem,
mem, mem[i + 1], M(mem, mem[i + 1]));
printf("%2.2s: %d / %d = %f\n", &mem,
mem, mem[i + 1], D((float)mem, (float)mem[i + 1]));
}

return(0);
}
 
V

Vijaykumar Dave

Is there anyone have calculator program with memory function ?

I need it for submission of assignment.

Vijaykumar Dave

Thanks to all as I have tried and created my own program. Thanks for
boosting me to do the work....

thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top