Question
STRING TO FUNCTION 'C' HELP PLEASE!!!!!!! I've got an assignment where I have strings (char num1, char num2, char ops). I know they are an
STRING TO FUNCTION 'C' HELP PLEASE!!!!!!!
I've got an assignment where I have strings (char num1, char num2, char ops). I know they are an array of characters, and i've written a function that decodes them no problem, however, I need to come up with a working method of getting the operator string (ops) to ONLY do + and - commands and reject commands like: "!", "*", "++", "--", etc. with an error print. It should be easy but it's not working as planned for me and gives me problems (i've been using a lot of if/else). Please help me out with this part. Keep in mind I have a function that converted num1 and num2 into integers called "ntin()".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started