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

where did i write wrong? It just writes 1 star

Expand|Select|Wrap|Line Numbers
  1. #include <iostream.h>
  2. #include <conio.h>
  3. int main()
  4. {
  5. clrscr();
  6. int a,i,j;
  7. cin>>a;
  8. for (i=1;i<=a;i++);
  9. {
  10. for(j=1;j<=i;j++);
  11. {
  12. cout<<"*";
  13. }
  14. cout<<"\n";
  15. }
  16. getch();
  17. }
Nov 12 '12 #1
3 1449
Meetee
931 Expert Mod 512MB
Why you wrote ; after for loop? And what is the value of 'a' you enter?
Nov 12 '12 #2
a is a number that the user enter for example 5 or 6
i want to write a program to cout this>>
*
**
***
****
*****
Nov 12 '12 #3
i erase the ; after for loop and it workss thanks so much
Nov 12 '12 #4

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

Similar topics

1
by: brian | last post by:
how does document.write interpret "" and '' (double quotes and single quotes) what is the significance of &Url (does it signify the current url) colon : is it represented as %3A ? and...
3
by: Mark Miller | last post by:
I have a char array and when I write it to a file using BinaryWriter the position of the pointer is the size of the array + 1. For example: writing char leaves the pointer at position 26 after...
4
by: Prowler | last post by:
In the application we are currently building, we need to write positioning code on-the-fly, based upon the screen offset of the element in the AS/400 application which drives the Web app. The 400,...
9
by: John | last post by:
Hi, I need to write out bits that I receive from another process. These are boolean values. I need there to be 8 bits in every byte. I know I could write these bits out as char's using one bit...
83
by: Anonymous | last post by:
Came across some code summarized as follows: char const* MyClass::errToText(int err) const { switch (err) { case 0: return "No error"; case 1: return "Not enough"; case 2: return "Too...
8
by: mohammaditraders | last post by:
#include <iostream.h> #include <stdlib.h> #include <conio.h> #include <string.h> class Matrix { private : int numRows, numCols ; int elements ;
33
by: NicolasG | last post by:
Hi, I want to be a professional python programmer, unfortunately I'm working on technical support and don't have the time/patience to start making projects my self. I tried to apply to some...
6
by: kang jia | last post by:
hi this is my database in models.py in the Django application, however, i don not know where is the error, i have tried many times, but always got error to set up database, sometimes they claim...
12
by: kang jia | last post by:
hi currently i am doing this car booking website. i would like to only update our inventory one day before customer's start booking time, thus before that, i am still able to rent to other...
6
by: globalrev | last post by:
i ahve a program that takes certain textsnippets out of one file and inserts them into another. problem is it jsut overwrites the first riow every time. i want to insert every new piece of...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.