McCharts - ArkTS Programming Software Development by 杨_659 ….options = Object.assign({}, def_option, this.options) } build() { Canvas(this.context) .width(this.options.cWidth) .height(this.options.cHeight) .onReady(() => { }) } …the code carefully: ```js build() { Canvas(this.context) .width(this.options.cWidth) .height(this.options.cHeight) .backgroundColor(this… Re: width Programming Software Development by Racoon200 That's pithagoras i think. You need the width or square and height. Also the starting points (corner square drawed from) Then you do an equation: width**2 + height**2 = distanceBetweenPonts**2 width Programming Software Development by gusbear how after drawing a square with two points at opposite corner would i find the width of it?? thanks Re: width Programming Software Development by Ene Uran If you have upper left corner coordinates (x1, y1) and lower right corner coordinates (x2, y2), then your width would simply be x2 - x1. Width adjustment for a simple jquery slider Programming Web Development by phaedrusGhost …;}); var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation…for just the visible items) li.css({width: li.width(), height: li.height()}); ul.css(sizeCss,…div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images if(… width section Programming Software Development by jimJohnson … the height to exit! Enter the height: 7 Enter the width: 5 Enter the character to fill the rectangle with: + - - …again!!! Enter the height: 5 Enter the width: 1 Invalid: Width cannot be less than 3. Try Again… for the height to exit!"; double cha, height = 0, width = 0; cha = Get_Character(); while (cha != -1) { … Re: width section Programming Software Development by jimJohnson …{ do { cout << "Enter the width: "; width = Get_Number("width"); if ( width <=3 ) { cout << "… << endl; Draw_Rectangle(height, width, symbol); Draw_Top_Bottom(width); cout << endl; Draw_Middle(height, width, symbol); cout << endl… Re: width section Programming Software Development by jimJohnson … do { cout << "Enter the width: "; width = Get_Number("width"); if ( width <= 3 ) { cout << &… = Get_Character(); Draw_Rectangle(height, width, symbol); Draw_Top_Bottom(width); cout << endl; Draw_Middle(height, width, symbol); Draw_Top_Bottom(width); cout << endl… Re: width section Programming Software Development by jimJohnson … void Draw_Rectangle(int height, int width); void Draw_Top_Bottom(); void Draw_Middle(); int main() {… Get_Number(); cout << "Enter the width: "; width = Get_Number(); cout << "Enter …Draw_Rectangle(int height, int width) { int a = height; int b = width; } void Draw_Top_Bottom() { int width, count = 0; char… Re: width section Programming Software Development by jimJohnson …(int height, int width, char symbol); void Draw_Top_Bottom(int width); void Draw_Middle(); int main() { int height, width, i; char symbol…;< "Enter the width: "; width = Get_Number(); for (i = 0; width.length(); i++); { cout << width[i] << &… Re: width section Programming Software Development by jimJohnson …(); void Draw_Rectangle(int height, int width, char symbol); void Draw_Top_Bottom(int width); void Draw_Middle(); int main() { int height, width, i; char symbol; cout… << "Enter the width: "; width = Get_Number(); for (i = 0; width.length(); i++); { cout << width[i] << " "… Re: width section Programming Software Development by VernonDozier …quot;; height = Get_Number(); cout << "Enter the width: "; width = Get_Number(); cout << "Enter the character to fill… "; } else { inputInvalid = false; } } return x; } void Draw_Rectangle(int width, int height, char symbol) { using namespace std; } void Draw_Top_Bottom(int… Re: width section Programming Software Development by jimJohnson … int Get_Number(); void Draw_Rectangle(int height, int width, char symbol); void Draw_Top_Bottom(); void Draw_Middle(); … else cout << "Enter the width: "; width = Get_Number(); cout << "Enter… with: "; symbol = Get_Character(); Draw_Rectangle(height, width, symbol); return 0; } int Get_Number() { int… Re: width section Programming Software Development by VernonDozier …) { exit(1); } else cout << "Enter the width: "; width = Get_Number(); cout << "Enter the character to fill…(char symbol) { } char Get_Character() { for(int col = 0; col < width; ++ col) { cout << symbol; } } [/code][/QUOTE] Your Draw_Middle function… Re: width section Programming Software Development by jimJohnson …) { exit(1); } else cout << "Enter the width: "; width = Get_Number(); cout << "Enter the character to fill… the rectangle with: "; symbol = Get_Character(); Draw_Rectangle(height, width, symbol); return 0; } int Get_Number() { int x; bool inputInvalid = true… Re: width section Programming Software Development by VernonDozier … cout << "Enter the width: "; width = Get_Number(); cout << "…with: "; symbol = Get_Character(); Draw_Rectangle(height, width, symbol); return 0; } int Get_Number() {…char Get_Character() { for(int col = 0; col < width; ++ col) { cout << symbol; } } … Re: width section Programming Software Development by jimJohnson …) { exit(1); } else cout << "Enter the width: "; width = Get_Number(); cout << "Enter the character to fill…(); cout << endl; Draw_Rectangle(height, width, symbol); Draw_Top_Bottom(width); cout << endl; Draw_Middle(height, width, symbol); cout << endl; Draw_Top_Bottom… Re: width section Programming Software Development by jimJohnson …height to exit!"; int height, width; char x; height = Get_Number(); width = Get_Number(); cin >> …; while (x = 1) { height = Get_Number(); } width = Get_Number(); return 0; } int Get_Number() { int height; int… width; cout << "\nEnter the height… Re: width section Programming Software Development by jimJohnson …for the height to exit!"; int height, width; char x; height = Get_Number(); width = Get_Number(); while (x = -1) … return 0; } int Get_Number() { int height; int width; cout << "\nEnter the height: "…; cout << "Enter the width: "; cin >> width; return (height); } [/code] Re: width section Programming Software Development by VernonDozier …height to exit!"; int height, width; char x; height = Get_Number(); width = Get_Number(); while (x = -1…0; } int Get_Number() { int height; int width; cout << "\nEnter the height:… cout << "Enter the width: "; cin >> width; return (height); } [/code][/QUOTE]… Re: width section Programming Software Development by jimJohnson …height: "; height = Get_Number(); cout << "Enter the width: "; width = Get_Number(); Draw_Top_Bottom(char ); Draw_Middle(); cout << "Enter… with: "; symbol = Get_Character(); return 0; } void Draw_Top_Bottom(int width) { } void Draw_Middle(char symbol) { } void Draw_Rectangle(int height, int… Re: width section Programming Software Development by VernonDozier …quot;; height = Get_Number(); cout << "Enter the width: "; width = Get_Number(); Draw_Top_Bottom(char ); Draw_Middle(); cout << "… "; symbol = Get_Character(); return 0; } void Draw_Top_Bottom(int width) { } void Draw_Middle(char symbol) { } void Draw_Rectangle(int height… Re: width section Programming Software Development by jimJohnson … std; char Get_Character(); int Get_Number(); void Draw_Rectangle(int height, int width, char symbol); void Draw_Top_Bottom(); void Draw_Middle(); int main() { int height…: "; height = Get_Number(); cout << "Enter the width: "; width = Get_Number(); cout << "Enter the character to fill… Re: width section Programming Software Development by mitrmkar …using namespace std; int main() { int height = 3; int width = 3; unsigned char fillSymbol = 0xf0; // draw a 3x3 … while(height --) { for(int col = 0; col < width; ++ col) { // output the symbol one at a time cout… strange ways, i.e. // this seems like width is an instance of a class/struct having a member… Re: width section Programming Software Development by jimJohnson …int Get_Number(); void Draw_Rectangle(int height, int width, char symbol); void Draw_Top_Bottom(); void Draw_Middle(); …(); cout << "Enter the width: "; width = Get_Number(); cout << "Enter…quot;; symbol = Get_Character(); Draw_Rectangle(int height, int width, char symbol); return 0; } int Get_Number() … Re: width section Programming Software Development by jimJohnson …(); cout << "Enter the width: "; width = Get_Number(); cout << "Enter…quot;; symbol = Get_Character(); Draw_Rectangle(int height, int width, char symbol); return 0; } int Get_Number() … = false; } } return x; } void Draw_Rectangle(int width, int height, char symbol) { using namespace std; } void… Re: width section Programming Software Development by Lerner [code] //basic main function int main() int height, width height = Get_Number(1); width = Get_Number(2); //Get_Number prototype int Get_Number(int x) sentinnel variable… user for height if x == 1 else ask user for width accept input if input less than 0 do something else… Re: width section Programming Software Development by Lerner … it returns a char, not an numerical value. Height and width have nothing to do with the Get_Character function. They should… the Get_Number function. cha should be type char, height and width should be type int. Line 15 should be in Get_Number… Re: width section Programming Software Development by VernonDozier … Get_Number. You ask the user for input for the variable width, but that input is lost when the function ends and… Re: width section Programming Software Development by TMD well now it looks like you don't have anything to exit your loop and it keeps repeating... change your while loop to something like [CODE]while (x>=-1)[/CODE] I don't quite understand why you are asking for the height and width twice...