AllExperts > Experts 
Search      

C

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More C Answers
Question Library

Ask a question about C
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Joydeep Bhattacharya
Expertise
Ability to solve C and Data Structure problems and puzzles with simple and easy to understand logic.

Experience
C, C , Data Structure, PHP, Web Designing

Organizations
http://www.scodz.com Designation: webmaster

Publications
http://www.scodz.com

Education/Credentials
Presently doing Master of Computer Application from a reputed college in Kolkata.

Past/Present Clients
http://analysingc.50webs.com http://www.funforu.com

 
   

You are here:  Experts > Computing/Technology > C/C++ > C > please help

Topic: C



Expert: Joydeep Bhattacharya
Date: 3/8/2008
Subject: please help

Question
When I run this program:
#include<stdio.h>
#include<conio.h>
int main()
{
int km, i;
float res, lt;

clrscr();

printf("Welcome to the Sears kilometers per liter calculator.\n\n");

for(i=1;i<=4;i++)
{
printf("\n\nEnter the number of kilometer for tank %d#: ",i);
scanf("%d",&km);
printf("Enter the number of liters used by tank %d#: ",i);
scanf("%f",<);
res = (float)km / lt;
printf("*** The kilometers per liter for tank %d# is %.1f",i,res);
}
getch();
}

I get an error message: "parse error before '<'"

Can you tell me what I am doing wrong?

Thanks in advance

Answer
Hi Carl

The problem lies in line number 17,
scanf("%f",<); this line i think should be replaced by scanf("%f",<);
or some other float type variable.

Please do lemme know in case of any further problem with the code.

regards
Joydeep Bhattacharya
http://www.scodz.com

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.