954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

(C) have 2 parse errors (help)

here is my problem
main.c:17: error: parse error before '{' token
main.c:27: error: parse error before string constant

#include <stdio.h>
#include <c.h>
#include <math.h>
#include <ctype.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>

#define kmll 200
#define Kzll 0

int myint,any,go;
int main (int argc, const char * argv[]) {

(myint, any, go) = 0 ;

// here parse error
do printf(" helo guys plese incert a number") {

if any = 0 {  

scanf("%c %c",myint,any);   

else 

printf(" next code"); } 

// here parse error
printf(" %d + %d = %d ", myint, any,(any + myint));

else printf(" uno");

return 0; }

a quick reply to the problem would be helpfull

zenoen
Newbie Poster
16 posts since Dec 2005
Reputation Points: 10
Solved Threads: 1
 

need () around if:
if ( any == 0 )

also, you want == not =

winbatch
Posting Pro in Training
466 posts since Feb 2005
Reputation Points: 68
Solved Threads: 18
 

try concentrating on { } brackets and matching if-else statements

SpS
Posting Pro
599 posts since Aug 2005
Reputation Points: 70
Solved Threads: 32
 

still doesent work please help

#include <stdio.h>
#include <c.h>
#include <math.h>
#include <ctype.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>

#define kmll 200
#define Kzll 0

int myint,any,go;
int main (int argc, const char * argv[]) {

(myint, any, go) == 0 ;



// stupid error is some where under here ( parse error befor '{' token ) 
//help it should work but doesent
/*dang it */ do printf(" helo guys plese incert a number "); {


while any = 0 {  

scanf("%c %c",myint,any);   

else 

printf(" next code"); } 


// here 2 im in need of help (parse error befor string constant) 
// i don't see the problem help me
printf(" %d + %d == %d ", myint, any,(any + myint)); 


else printf(" uno"); }

return 0; }
zenoen
Newbie Poster
16 posts since Dec 2005
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You