VB Help: Height, Weight for Men & Women

  • Thread starter Thread starter alanveron
  • Start date Start date
AI Thread Summary
The code provided is intended to calculate and display height, weight for women, and weight for men based on user input. The calculations for weight are derived from the height input, with specific formulas applied. However, the output is initially formatted incorrectly, causing the labels "Height", "Weight-women", and "Weight-men" to appear together without separation. To resolve this, the Print statement should be modified to include spaces between the variables. The corrected Print statement is: Picture1.Print x & " "; y & " "; z, which ensures that the values for height, weight for women, and weight for men are displayed in separate columns aligned with their respective labels.
alanveron
Messages
45
Reaction score
0
Picture1.Print "Height"; "Weight-women"; "Weight-men"
a = Val(Text1.Text)
b = Val(Text2.Text)

Dim x, y, z As Integer
x = a
y = x * 3.5 - 108
z = x * 4 - 128
Do
Picture1.Print x; y; z
x = x + 1
y = x * 3.5 - 108
z = x * 4 - 128
Loop Until x > b

this is my command...but my when i run it,the words 'heightweight-womenweight-men' all stay together...can i separate them?
if possible i would like the value of x will display in the same column with height,while y in the same column with weight-women and z will be in the same line with weight-men
 
Computer science news on Phys.org
just add spaces in your print statement:

Picture1.Print x & " "; y & " "; z
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
5
Views
2K
Replies
20
Views
4K
2
Replies
93
Views
14K
4
Replies
175
Views
25K
Replies
33
Views
8K
Back
Top