1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vesna_86 [32]
3 years ago
15

Write a VB program to convert a temperature from Celsius to Fahrenheit and vice versa.

Computers and Technology
1 answer:
Ugo [173]3 years ago
8 0

Answer:

Dim c As Double

Dim f As Double

Private Sub CmdClr_Click()

TxtInput.Text = “”

TxtInput.SetFocus

End Sub

Private Sub Command1_Click()

c = Val(TxtInput.Text)

If Val(c) = 0 And TxtInput = “” Then

MsgBox “Enter Any number”, vbInformation, “Result”

TxtInput.SetFocus

Else

f = 9 * c \ 5 + 32

MsgBox “Fahrenheit :” & ” ” & f, vbInformation, “Result”

End If

End Sub

Private Sub Command2_Click()

f = Val(TxtInput.Text)

If Val(c) = 0 And TxtInput = “” Then

MsgBox “Enter Any number”, vbInformation, “Result”

TxtInput.SetFocus

Else

c = (f – 32) * 5 \ 9

MsgBox “Celsius :” & ” ” & c, vbInformation, “Result”

End If

End Sub

Explanation:

You might be interested in
Write a program that accepts a whole number as input, multiplies that number by 12, and then outputs the product.
lesya692 [45]

try:

   num = int(input("Enter a number: "))

   print(12*num)

except ValueError:

   print("Please enter a number!")

I wrote my code in python 3.8

6 0
3 years ago
Read 2 more answers
A programmer is responsible for solving a problem and making a presentation that includes his solution. He does not have much ro
sashaice [31]

Probably 2 but that's just a guess.


5 0
3 years ago
Read 2 more answers
You are part of which sphere of Earth?
Elden [556K]
We are on the lithosphere
4 0
3 years ago
Read 2 more answers
Which of these is an online presentation tool?
Marina86 [1]
Google slides is and online presentation tool
5 0
3 years ago
Read 2 more answers
True or False? Inserting special characters in a document can be completed using the Ribbon or a keyboard shortcut.
lina2011 [118]
True. hope this helps!
5 0
3 years ago
Other questions:
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    11·2 answers
  • Over a TCP connection, suppose host A sends two segments to host B, host B sends an acknowledgement for each segment, the first
    6·1 answer
  • _______ can be used more than once.
    8·1 answer
  • Helping people keep track on things is the purpose of_____ A database B table C query D form​
    12·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • 5. The operating system has two components
    12·2 answers
  • PLEASE HELP WITH KHAN ACADEMY WILL GIVE BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!
    12·1 answer
  • 3) Controls on a form or report that describe each field—often the field name—in the underlying table
    7·1 answer
  • Mr. stevens is the principal of a high school. why might he want to export data from a database of students’ exam scores? to cre
    5·2 answers
  • Enter a formula in cell C13 to look up the registration fee for the first vehicle. Use the vehicle type in cell C4 as the Lookup
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!