473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

expected identifier or ‘(’ before ‘{’ token

2
THIS IS MY CODE AND THE ERROR: expected identifier or ‘(’ before ‘{’ token

I can't see what's wrong with my code. I'm just new in C programming

#include <stdio.h>
int main(void)
int (max = 0, min = 0, var = 0, N = 0, count = 1)
{
printf("Enter some integers to determine max and min\n");
scanf("%d", &N);

printf("Please enter a number\n");
scanf("%d", &var);

while (count <= N) {
for (var >= max; var == max; count++)
printf("The maximum number is %d.\n", &max);
for (var <= min; var == min; count++)
printf("The minimum number is %d.\n", &min);
}
printf("The maximum number is %d and the minimum is %d.\n", &max, &min);

return 0;

}
Dec 7 '13 #1
3 9625
Luuk
1,047 Expert 1GB
probably (i'm net to c too) this line:
Expand|Select|Wrap|Line Numbers
  1. int (max = 0, min = 0, var = 0, N = 0, count = 1)
oh, and the line after that (with the '{') also...
Dec 7 '13 #2
kfrost
2
What do I have to do with it? I really don't know what's wrong with that line
Dec 8 '13 #3
donbock
2,426 Expert 2GB
Move that line down one, so that it is inside of function main.
Remove the parentheses from that line.
Terminate that line with a semicolon.
Dec 9 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Phil Powell | last post by:
<script> <!-- function willProceedToPay() { var willPay = window.confirm('Vill du g' . String.fromCharCode(229) . ' till betaling?'); if (willPay) return true; return false; }
3
by: sandy | last post by:
I am a student who is losing his mind. The code below is a header file which has the line: void ClearList(ListType *list); which generates the following compile time errors: variable or...
21
by: Ram Prasad | last post by:
I am trying to write a simple libspf2 plugin code for my postfix ( milter) I am getting this unhelpful error message when I try to compile gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c...
1
by: nagaraj | last post by:
In Dev C++, we tried to compile a application, but it will throw some peculiar error. please find it below "path/main.cpp expected `]' before ';' token" and the source code is "DWORD rtec_Stack...
5
by: nina01 | last post by:
Hi! I'm working on a mini compiler with flex and bison. The ".l" and ".y" files are generated successfully. However, when I try to compile the hole thing using the command "gcc -o comp comp.tab.c...
3
by: ENDERWIGGINs | last post by:
I have been trying to debug it for two hours now, Can anyone see why I am getting these two errors. Thanks! #include <stdio.h> #include <stdlib.h> #include "Huffman.h" # define Unlinked -1 ...
1
by: bals3239 | last post by:
I am using a program called putty to write basic programs in C/ C++ for an introduction to computer programming class. I am very new at programming and am just getting started writing very simple...
1
by: mikr | last post by:
I'm new to jquery, and hoping it will make my client side coding more friendly (particularly with regards to ie). As is usually the case, I've got some code that works nicely in ff, but kicks out...
5
by: Phacer | last post by:
When trying to compile I get this /main.c:30: error: expected identifier or '(' before '{' token ../main.c:31: error: expected identifier or '(' before 'if' make: *** Error 1 SDL_SysWMinfo...
9
by: Fredrik Sveide | last post by:
hi im trying to make an simple app and i where almost done but then this error apear and i just cant figure out how to fix it ! Please help me im desperate?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.