473,325 Members | 2,828 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,325 software developers and data experts.

error statement missing in c language

Expand|Select|Wrap|Line Numbers
  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main ()
  4. {
  5. int n,a;
  6. clrscr();
  7. n=1;
  8.   do
  9.     {
  10.       do
  11.     {
  12.       a=1;
  13.       printf("A");
  14.       a++;
  15.     }while(a<=n);
  16.     printf("\n")
  17.        n=n+1;
  18.      }while(n>=5);
  19.    getch();
  20.  }
i am a studend..i am learning c language
here is the program that shows the error statement missing in n=n+1. Why it shows the error?
Nov 10 '15 #1
2 2048
zmbd
5,501 Expert Mod 4TB
+ Moved from Access/VBA to C-forums.
+ Please always use the [CODE/] format tool to format your posted script
+ Please pay attention to where you post your questions.

We do not normally do homework problems.
Can you tell us what you've done to trouble shoot this program and we'll guide you from there...
Nov 10 '15 #2
donbock
2,426 Expert 2GB
A syntax mistake on one line may not be detectable to the compiler until a subsequent line. In general, when the compiler reports an error, start at the indicated by the error message and scan upwards.

By the way, consider your two loops. The outer loop has n going from 1 to 6. What is the range of a inside the inner loop when n is, let's say, 3?

By the way, the C Standard requires that main return an int. You defined it to return void.
Nov 11 '15 #3

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

Similar topics

2
by: jannordgreen | last post by:
I am using Winxp and Ms Access 2003. I get this error message: error 3137, Missing semicolon (;) at end of SQL statement when I run this code: Dim I As Integer For I = 0 To...
2
by: drisso | last post by:
Hello, I have searched that error on these message boards, msdn and crystaldecisions.com. I found tutorials that showed how to export a crystal report to pdf, but like many others I am getting...
2
by: im2cre8iv | last post by:
Here is my code where I am receiving the error: #include <fstream> #include "BinaryTree.h" using namespace std; Node* BinaryTree::MakeTree(ifstream& infile) { char name; infile>>name;
3
by: cardoow | last post by:
Hi this is my code : HRESULT APIENTRY hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount) { ...
12
by: slizorn | last post by:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int err how do i fix that error? for example given to this section of code.. Matrix::addMatrix(Matrix m1,...
1
by: dianaroslan | last post by:
have an error in this coding. the error is statement missing at line (78,11) thank you. #include <iostream> #include <conio> const int listSize=2; struct menuItemType { char menuItem ;
4
by: Varad Mahajan | last post by:
While I was making a programme in C++ for Calculating area of the square a compiling error was found as - statement missing.
4
by: sandytayag021 | last post by:
meaning of statement missing in turbo c program
1
by: NielleC21 | last post by:
i put all the required code for the program but it just won't work -_- statement missing with the main but you can't put ";" next to main() what do i do? :( I really need this :( main() {...
1
by: faraz baloch | last post by:
hey i have formatted the whole program but the 2 errors are coming one is if statement missing and 2nd is if statement misplaced.....in last in have written just else but misplaced problem is coming...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.