It dosent work as i want , help me

+1 ♦Avishka RJ ♦™ · February 23, 2015


//   *
//  ***
// *****
//*******
// need to get output as above.
#include <ncurses.h>
int main(){
initscr();
start_color();
init_pair(1,COLOR_WHITE,COLOR_BLACK);
attrset(COLOR_PAIR(1));
int b = 7;
int x = 20;
int y = 19; 
for(int c = 0;c <4 ; c++ ){
        for(int a=0; a<b;a++){
            printw("*")
        }
        b-=2;
        move(y-1;x+1);
}
getch();
endwin();
return 0;
}








Post a Reply

Replies

Oldest  Newest  Rating
+1 ♦Avishka RJ ♦™ · February 23, 2015
c++
0 Cardinal Coog · February 23, 2015
I'm curious... What language is this?
  • 1

C++

107,058 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator