Looping Help C

Pages: 1, 2
free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

Looping Help C

osknockout
@rize619: Yeah, I'm talking about the same LOOPS. I couldn't tell what your first program was doing at first though, so that question may have been cryptic, but if you're programming -competently- in C++, how do you not understand what I'm talking about?

Anyway, for #1:
CODE
int i;
while(i!=7)
{ std::cout << "*"; i++;}
i = 0;
while(i!=3)
{ std::cout << "\n" << "* *"; i++;}
i = 0;
std::cout << "\n";
while(i!=7)
{ std::cout << "*"; i++;}

There. So simple a n00b can understand it. I'm not going to waste my time running it to see if it works, Just add the headers, and you should be able to modify it if something's wrong.

For #2: Copy-and-paste ANY of the code examples given for the 1 1-2 1-2-3 stuff. Then, treat the integers as characters, it's called typecasting, that's what the (char) means. Add 64 so that it displays in ASCII properly, and you're done. If you think I'm wrong, try coding it and play with the constant as you wish.
If you don't understand this still, please go back slowly and review the stuff you don't know, this should all be standard stuff though. The only place where I can see confusion is where I requested that the spaces be removed; I was looking at the original post which has spaces, it seems the c++ code doesn't.

Alright, apparently you don't know what I'm talking about. Wikipedia time:
QUOTE
from Pascal's Triangle: In mathematics, Pascal's triangle is a geometric arrangement of the binomial coefficients in a triangle.
from Binomial Coefficients: the binomial coefficient of the natural number n and the integer k is the number of combinations that exist

Ok, given the above definitions, please tell me what on earth pascal's triangle had to do with the previous posts.
And you're right, a programmer should know what Pascal's triangle is well... but then that begs the question, WHY are you asking behind it's logic then?

 

 

 


Reply

rize619
bro. you are giving spaces by space bar but i need it with the loop
yeah u are right about pascal triangle but i need to generate it using c++ loops structure...



Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Similar Topics

Keywords : looping


    Looking for looping, c

Searching Video's for looping, c
advertisement



Looping Help C



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE