473,385 Members | 1,548 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,385 software developers and data experts.

how to solve this program errors

Expand|Select|Wrap|Line Numbers
  1. ‪#‎include‬<stdio.h>
  2. #include<conio.h>
  3. int main()
  4. {
  5. int i, j, n=20, temp,c;
  6. do{
  7. temp=n/4;
  8. for(i=1; i<=n/4; i++)
  9. {printf(“\t\t”);
  10. for(j=1; j<temp; j++)
  11. printf(” “);
  12. temp–;
  13. for(j=1; j<=2*i-1; j++)
  14. printf(“*”);
  15. printf(“\n”);
  16. }
  17. temp=n/3;
  18. for(i=3; i<=n/3; i++)
  19. {printf(“\t “);
  20. for(j=1; j<temp; j++)
  21. printf(” “);
  22. temp–;
  23. for(j=1; j<=2*i-1; j++)
  24. printf(“*”);
  25. printf(“\n”);
  26. }temp=n/2;
  27. for(i=4; i<=n/2; i++)
  28. {printf(“\t”);
  29. for(j=1; j<temp; j++)
  30. printf(” “);
  31. temp–;
  32. for(j=1; j<=2*i-1; j++)
  33. printf(“*”);
  34. printf(“\n”);
  35. }
  36. for(i=0;i<5;i++){
  37. printf(“\t\t “);
  38. printf(“***”);
  39. printf(“\n”);}
  40. printf(“\t\t *******”);
  41. printf(“\npress 1 to recontinue to this program otherthan press any key:”);
  42. scanf(“%d”,&c);}
  43. while(c==1);
  44. getch();
  45. return 0;
  46. }
Jun 1 '16 #1

✓ answered by donbock

I notice the fourth line from the bottom is
Expand|Select|Wrap|Line Numbers
  1. while(c==1);
Your program will spin here forever if c is 1.

3 1230
donbock
2,426 Expert 2GB
Please reenter your program using CODE Tags.

What error are you getting?
Does it occur at compile-time, link-time, or run-time?
Is there an error message? If so, please provide it.
Jun 1 '16 #2
donbock
2,426 Expert 2GB
I notice the fourth line from the bottom is
Expand|Select|Wrap|Line Numbers
  1. while(c==1);
Your program will spin here forever if c is 1.
Jun 1 '16 #3
in this program on ' expression syntax ' error
Jun 1 '16 #4

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

Similar topics

10
by: electrixnow | last post by:
I have the following test code that opens and reads a file. The file is over 19000 lines long. The file contains two fields on each line: "text,text\n" I have placed a test that for loops up to...
1
by: dhina.jayavelu | last post by:
Hi, I Executed my project Developed in "C" with Valgrind tool with memory check option it shows these errors i don't know how to solve these errors.After getting these errors i try to put free()...
3
momotaro
by: momotaro | last post by:
am supposed to have the same data that i have entred but its not the case!!! can you help me???? #include<stdio.h> typedef struct { char name; double salary; int rank;
3
by: thalinx | last post by:
Hi can ayone help me with this program, cause i dont know how to solve the compiling errors here. thanks # include<stdlib.h> # include<conio.h> # include<stdio.h> # define MAXCADENA 8 # define...
2
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following...
1
by: epilogue | last post by:
Hey guys Im pretty new to Java and while I am finding it enjoyable i am getting several errors!!! Do you think you could help me on this particular question of an Assignment im doing. I have to...
3
by: viny2cool | last post by:
Here is my code : CREATE OR REPLACE PROCEDURE BranchAppProc (BranchIN IN Branch.Branchname.Branchname%TYPE, BranchPOPUIN IN Branch.Branchname.Branchpopulation%TYPE) IS BranId...
8
by: vtuning | last post by:
Hi, i'm doing a project in Visual C++....in Portuguese....i'm hoping you can help figure out the problem eventhough it's not in english... here is the whole code....incomplete in the int main and...
2
by: sandip sen majumder | last post by:
CREATE OR REPLACE TRIGGER TEMP_CUST AFTER INSERT ON TEMP_CUSTOMER REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW DECLARE v_count NUMBER(5) := 0; v_cust_id ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.