Thread: I have a question about my project...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2020
    Posts
    3

    I have a question about my project...

    Can someone please review my .c file and answer my question on line 24, 25.

    Thank you in advance and have a nice day!!!

    Here's a copy of my file in case it wasn't attached:
    Code:
    //This is just a rough draft of a project I am working on, so I apologize for the sloppy work..
    #include <stdio.h>
    #include <stdlib.h>
    
    
    int main (){
    
    
    
    
    float a,b,c,d,e,y,w;
    float f=3.79;
    b=100;
    e=64;
    d= f/e;
    
    
    while (a<10){
    
    
    
    
        printf("Enter your number: \n");
        scanf("%f",&c);
    
    
        w=.059219*c;
        y=d+=w;
        if(y>10){
        printf("You did it!!!!\n");
    y=y-10;//Why is the value of "y" not being subtracted from this statement?
    //When I run it, the value keeps adding from "d+=w" past the if statement.
    }
    
    
    }
    return 0;
    }
    Attached Files Attached Files
    • File Type: c hw1.c (560 Bytes, 217 views)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 08-02-2013, 06:45 PM
  2. Project Euler Question
    By Head In Jar Man in forum C++ Programming
    Replies: 6
    Last Post: 04-26-2009, 02:59 PM
  3. MSVC project question
    By l2u in forum Windows Programming
    Replies: 2
    Last Post: 03-28-2007, 10:45 AM
  4. my first project, A question
    By C+noob in forum C++ Programming
    Replies: 29
    Last Post: 07-07-2005, 12:19 AM
  5. VS .net project setting question
    By Jumper in forum C++ Programming
    Replies: 1
    Last Post: 05-13-2004, 11:03 AM

Tags for this Thread