C Programming?
How can I write a function in C that will take in a number, n, and will display one * on the first line, then one more each line until it displays a line with n *'s.
Example: draw(4) would display:
*
**
***
****
My main problem is getting it to print a new line at the appropriate time, and not after each *
C Programming?
void printStars(int n){
聽 if (n < 1) return;
聽 for(int i = 1; i <= n; ++i){
聽 聽 for(int j = 1; j <= i; ++j){
聽 聽 聽 printf('*');
聽 聽 聽 }
聽 聽 printf('\n');
聽 }
}
- C++......................?
- is there a less complicated c++ compiler than microsoft express 2008? i found it to complicated and hav found no other free program to make a fps. a t..
- C++???????
- I am trying to make a tic tac toe game for c++ but i dont know how to use an array to make the board. also after i make the board hiw do i code it so ..
- C++???????????????
- I HAVE NO IDEA WHAT C++ IS? and i have an exam tomorrow. I dont understand 1. character set 2.tokens. i also have the for statement program, if stat..
- C++..........................?
- where i find the best c++ programing books.C++..........................?AT www.esnips.com/C++..........................?Try doing a search. OReilly t..
- C++????????
- i need to know a simple program to concat two strings without using strcat inside operator overloading.plz help me with a program..............C++????..
- ...................c++?
- How would I create a program that that displays the sum of a sales amount in each of 4 regions, during a 3 month period, which would also display the ..
- "Smitfraud-C. Toolbar888&..
- I am a webmaster, and I am trying to build my website, but my computer keeps acting weird and seems to be going into random hybernation for no reason ..
- C programme...?
- I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
- C programme...?
- I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
- C programme...?
- I wrote a programme of calculator in C language. And it has two or three error so pl do correct them. And send me correct answer. Prog. is: #includest..
