2 Questions for C, one is how to get VIM working, and I keep getting unexpected token!

  • From: "Flof" < >
  • To:
  • Subject: 2 Questions for C, one is how to get VIM working, and I keep getting unexpected token!
  • Date: Tue, 09 Apr 2013 15:11:20 -0400

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

/*
 * 
 */
int main(void) 
{
    float fGallons;
    float fMiles;
    float fAverage;
    float tAverage;
    
    printf("Enter the gallons used (-1 to end):  ");
    scanf("%f", &fGallons)
    if(fGallons != -1){
        printf("%f  \n", &fGallons);
    }
    else{
        printf("\n Thanks for using our program  \n");
    }
    return 0;
}


I pretty much have errors from my first if statement down.(unexpected token), 
does not read any of my if or else statements, but printf and scanf work.  I 
am just learning programming, I do have cygwin setup for GCC as my c 
compiler. 

My next question, I recently switched from code::blocks to netbeans so I 
could use VIM.  I have downloaded the program but can not get it working!  
Thanks in advance!






2 Questions for C, one is how to get VIM working, and I keep getting unexpected token!

Flof 04/09/2013

Re: 2 Questions for C, one is how to get VIM working, and I keep getting unexpected token!

Paulo Panhoto 04/09/2013

Re: 2 Questions for C, one is how to get VIM working, and I keep getting unexpected token!

Ivan Soleimanipour 04/09/2013

Project Features

About this Project

CND was started in November 2009, is owned by Leonid Lenyashin, and has 130 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close