VB Help: Height, Weight for Men & Women

  • Thread starter alanveron
  • Start date
In summary, This conversation discusses the code for printing the height, weight for women, and weight for men. It involves using the variables a, b, x, y, and z to calculate the values and print them in columns and lines. The question is asked if it is possible to separate the words "height", "weight-women", and "weight-men" and display the values of x, y, and z in specific columns and lines. The solution is to add spaces in the print statement to achieve this.
  • #1
alanveron
45
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
  • #2
just add spaces in your print statement:

Picture1.Print x & " "; y & " "; z
 

1. What is VB?

VB, or Visual Basic, is a programming language that is used to create Windows applications. It is a user-friendly and event-driven language that is widely used in the development of software applications and business solutions.

2. How can I get help with VB?

There are many resources available for getting help with VB. You can join online forums and communities, attend workshops and training sessions, read books and tutorials, and consult with experienced programmers.

3. What are some common challenges in VB programming?

Some common challenges in VB programming include managing errors and debugging code, understanding the syntax and structure of the language, and keeping up with updates and new versions of VB.

4. Is VB a good language for beginners?

Yes, VB is often recommended as a good language for beginners because of its user-friendly and intuitive nature. It also has a large community of users and resources available for learning and support.

5. Can VB be used for web development?

While VB was originally designed for Windows applications, there are also frameworks and tools available for using VB in web development. However, other languages such as HTML, CSS, and JavaScript are more commonly used for web development.

Similar threads

  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Mechanical Engineering
Replies
20
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Math Proof Training and Practice
3
Replies
93
Views
10K
  • Math Proof Training and Practice
Replies
33
Views
7K
  • Math Proof Training and Practice
6
Replies
175
Views
20K
  • Math Proof Training and Practice
2
Replies
67
Views
8K
  • Math Proof Training and Practice
4
Replies
114
Views
6K
Back
Top