Thread: Error with calculator for Intro to C Programming course

  1. #1
    Registered User
    Join Date
    Feb 2021

    Error with calculator for Intro to C Programming course

    Hey guys. I'm making a calculator as an assignment for my Intro to C Programming course. I'm new to this forum so if I posted this in the wrong place forgive me. The problem I am having is that when I get to the 3rd scanf function (Inserting the second number), it just skips right over it and ends the whole function. I believe there is a simple syntax issue but I am not too sure and would appreciate any help. The code is in this pastebin: /*Name: William HorowitzCourse: CSCI 1110-03Subject: Assignment 1Instruc -

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    What you need to do is to compile at a high warning level, and pay attention to warnings. Actually, even at a low warning level your compiler is probably warning you about a typo error in your third scanf call, but you're probably ignoring the warning. There are other warnings that you should pay attention to as well.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help With Intro to C programming final project
    By Bgrossman in forum C Programming
    Replies: 8
    Last Post: 08-26-2013, 04:43 PM
  2. Intro to C programming help
    By bluebrandon in forum C Programming
    Replies: 3
    Last Post: 01-31-2012, 08:59 PM
  3. intro to c programming assignment help
    By aargoo in forum C++ Programming
    Replies: 3
    Last Post: 10-26-2010, 05:47 PM
  4. Intro to embedded programming
    By ohanna in forum C Programming
    Replies: 6
    Last Post: 03-13-2008, 03:16 PM
  5. Intro To Programming...need Advice Plz
    By dox82 in forum C++ Programming
    Replies: 2
    Last Post: 06-11-2003, 12:25 PM

Tags for this Thread