Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,162,741 members, 7,851,556 topics. Date: Wednesday, 05 June 2024 at 10:43 PM

How Can I Make This Calculator (C++) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / How Can I Make This Calculator (C++) (797 Views)

How Can I Make Payment For Any Udemy Course With My Credit Card? / My Semester GPA Calculator With Javascript / Javascript Source Code For GPA Calculator (2) (3) (4)

(1) (Reply) (Go Down)

How Can I Make This Calculator (C++) by TastyFriedPussy: 12:33am On Nov 14, 2022
since yesterday I've been on this to no avail. I dont just get how to make it work..
Im trying to make a calculator in C++, not just any calculator, but one that takes multiple integers and different arithmetic operators at a time and and only outputs when the user presses '=' or enter key..

something like this...... 20*4 -16+5/2+16 = cout<<answer<<\n and so on. Basically just doing multiple operations at a go. i just don't know what to think anymore. i've written and re-written code tire.
Please anyone with an idea or suggestion should help me out...
Re: How Can I Make This Calculator (C++) by Nobody: 3:25am On Nov 14, 2022
Just do a scientific calculator
Re: How Can I Make This Calculator (C++) by Arrayman: 7:16am On Nov 16, 2022
TastyFriedPussy:
since yesterday I've been on this to no avail. I dont just get how to make it work..
Im trying to make a calculator in C++, not just any calculator, but one that takes multiple integers and different arithmetic operators at a time and and only outputs when the user presses '=' or enter key..

something like this...... 20*4 -16+5/2+16 = cout<<answer<<\n and so on. Basically just doing multiple operations at a go. i just don't know what to think anymore. i've written and re-written code tire.
Please anyone with an idea or suggestion should help me out...
I don't understand the problem? Y not store those values in a variable and only do your computatio when you are ready.
Re: How Can I Make This Calculator (C++) by qtguru(m): 8:32am On Nov 16, 2022
Arrayman:
I don't understand the problem? Y not store those values in a variable and only do your computatio when you are ready.

How do you sort the order e.g BODMAS ?
Re: How Can I Make This Calculator (C++) by TastyFriedPussy: 10:15am On Nov 16, 2022
qtguru:


How do you sort the order e.g BODMAS ?
I think the computer should be able to sort it out it self, based on precedence levels cool
Re: How Can I Make This Calculator (C++) by qtguru(m): 10:24am On Nov 16, 2022
TastyFriedPussy:
I think the computer should be able to sort it out it self, based on precedence levels cool

Interesting mindset.
Re: How Can I Make This Calculator (C++) by Arrayman: 7:48am On Nov 19, 2022
qtguru:


How do you sort the order e.g BODMAS ?
Yyou can do the computation in whatever order you want
Re: How Can I Make This Calculator (C++) by techtalk123: 10:32am On Jan 02
As a fantasy baseball manager, the ERA Calculator is my go-to for evaluating pitchers and making strategic decisions for my team. https://era-calculator.com
Re: How Can I Make This Calculator (C++) by edicied: 1:05pm On Jan 02
You have to convert the Infix Expression to prefix expression, Then stack data structure is Your friend.

(1) (Reply)

$5K To $10,000 Weekly Guaranteed / Please Recommend A Good Laptop / Programming Yourself For Success

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.