LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2001, 05:10 PM   #1
vicente
Member
 
Registered: Jul 2001
Location: Lx (Portugal)
Distribution: Mandrake workstation8.0,red hat 7.2 , peanut linux
Posts: 134

Rep: Reputation: 15
theres something wrong with this??????


whats wrong?

#include <stdio.h>

int main ()
{
int place;

printf ("qual é o lugar? ") ;
scanf ("%d", &place) ;

if (place == 1 )
printf ("ganhou 10 pontos.\n") ;
else if (place == 2 )
printf ("ganhou 6 pontos.\n") ;
else if (place == 3 )
printf ("ganhou 4 pontos.\n") ;
else if (place == 4 )
printf ("ganhou 3 pontos.\n") ;
else if (place == 5 )
printf ("ganhou 2 pontos.\n") ;
else if (place == 6 )
printf ("ganhou 1 ponto.\n") ;
else
printf ("nao ganhou pontos.\n") ;
return 0 ;
}
 
Old 08-03-2001, 07:01 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
I think that you need to tell us what is wrong. It worked good for me. 10 points for winning first place and 0 for 7th place or more.
 
Old 08-03-2001, 09:24 PM   #3
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
10 points for first place? you're on



problem is, i tested the code out too. worked fine for me.



'course... i have no idea what a "ponto" is. that could be a problem.

one question - how are you compiling this?
 
Old 08-04-2001, 07:47 AM   #4
vicente
Member
 
Registered: Jul 2001
Location: Lx (Portugal)
Distribution: Mandrake workstation8.0,red hat 7.2 , peanut linux
Posts: 134

Original Poster
Rep: Reputation: 15
my problem is that i donīt have a aplication to do it in win 98 i try somes but didnīt work i try it with antichenius c# came out compiling error #109? how can i do it in win 98 ?
 
Old 08-04-2001, 02:56 PM   #5
vicente
Member
 
Registered: Jul 2001
Location: Lx (Portugal)
Distribution: Mandrake workstation8.0,red hat 7.2 , peanut linux
Posts: 134

Original Poster
Rep: Reputation: 15
isajera question

iīm tryng with antichenius C# on win 98 but i only get the compiling error #109 if you now other progam to do it please tell me, thanks.
 
Old 08-06-2001, 07:35 PM   #6
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
ugggh... a c# question...

sorry... i really don't know anything about c#... i assumed that it would be c-ansi compliant, in which case your program would work, but, then again, this is a microsoft language. i wouldn't put any incompatibility past them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what' s wrong phoenix_fei Programming 4 01-18-2005 10:56 AM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 12:46 AM
What's wrong? whaase Linux - Software 7 10-20-2003 12:39 AM
What am I doing wrong? funkenbooty Linux - Newbie 14 07-26-2003 02:16 AM
What did I do wrong? yakko Linux - Newbie 7 05-02-2002 07:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration