Notes
Notes - notes.io |
Console.Write("Enter first number: ")
a = Console.ReadLine()
Console.Write("Enter Second number: ")
b = Console.ReadLine()
sum = a + b
Console.Write("total={0}", sum)
-------------------------------------------------------------------------
Dim a, b As Double
Console.Write("A=")
a = Console.ReadLine()
Console.Write("B=")
b = Console.ReadLine()
If a = b Then
Console.Write("Equal")
End If
If a > b Then
Console.Write("a is big")
End If
If a < b Then
Console.Write("b is big")
End If
--------------------------------------------------------------------------
Dim p, d, pd As Double
Console.Write("Enter price:")
p = Console.ReadLine()
If p > 0 Then
If p > 0 And p <= 10 Then
d = p * 0.05
End If
If p > 10 And p <= 20 Then
d = p * 0.1
End If
If p > 20 Then
d = p * 0.2
End If
pd = p - d
Console.WriteLine("discount={0}", d)
Console.Write("Price after discount={0}", pd)
Else
Console.WriteLine("Price invalid")
End If
----------------------------------------------------------------------------
Dim n, sum, avg As Double
Dim count As Integer
Console.Write("Enter the number: ")
n = Console.ReadLine()
sum = 0
count = 0
While (n <> 0)
sum = sum + n
count = count + 1
Console.Write("Enter the number: ")
n = Console.ReadLine()
End While
avg = sum / count
Console.WriteLine("Sum={0}", sum)
Console.WriteLine("Average={0}", avg)
---------------------------------------------------------------------------
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msg As String
msg = "You have choosen" & vbNewLine
If c1.Checked Then
msg = msg & c1.Text & vbNewLine
End If
If c2.Checked Then
msg = msg & c2.Text & vbNewLine
End If
If c3.Checked Then
msg = msg & c3.Text & vbNewLine
End If
If c4.Checked Then
msg = msg & c4.Text & vbNewLine
End If
MsgBox(msg)
End Sub
Private Sub all_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles all.CheckedChanged
If all.Checked Then
c1.Checked = True
c2.Checked = True
c3.Checked = True
c4.Checked = True
Else
c1.Checked = False
c2.Checked = False
c3.Checked = False
c4.Checked = False
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked Then
c1.Enabled = True
c2.Enabled = True
c3.Enabled = True
c4.Enabled = True
all.Enabled = True
Else
c1.Enabled = False
c2.Enabled = False
c3.Enabled = False
c4.Enabled = False
all.Enabled = False
End If
End Sub
End Class
---------------------------------------------------------------------------
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim total, discount As Double
total = 0
If C1.Checked = False And C2.Checked = False And
C3.Checked = False Then
MsgBox("Please choose at least one movie")
ElseIf R1.Checked = False And R2.Checked = False Then
MsgBox("Please choose at least one discount")
Else
If C1.Checked Then
total = total + 3
End If
If C2.Checked Then
total = total + 4
End If
If C3.Checked Then
total = total + 2
End If
If R1.Checked Then
discount = total * 0.05
Else
discount = 0
End If
End If
T1.Text = total - discount
End Sub
End Class
----------------------------------------------------------------------------
Public Class Form1
Private Sub R1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles R1.CheckedChanged
If R1.Checked Then
all.Enabled = True
c1.Enabled = True
c2.Enabled = True
c3.Enabled = True
Else
all.Enabled = False
c1.Enabled = False
c2.Enabled = False
c3.Enabled = False
End If
End Sub
Private Sub all_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles all.CheckedChanged
If all.Checked Then
c1.Checked = True
c2.Checked = True
c3.Checked = True
Else
c1.Checked = False
c2.Checked = False
c3.Checked = False
End If
End Sub
End Class
-----------------------------------------------------------------------------
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim msg As String
msg = "You have choosed" & vbNewLine
If c1.Checked Then
msg = msg & vbNewLine & c1.Text
End If
If c2.Checked Then
msg = msg & vbNewLine & c2.Text
End If
If c3.Checked Then
msg = msg & vbNewLine & c3.Text
End If
If c4.Checked Then
msg = msg & vbNewLine & c4.Text
End If
MsgBox(msg)
End Sub
Private Sub all_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles all.CheckedChanged
If all.Checked Then
c1.Checked = True
c2.Checked = True
c3.Checked = True
c4.Checked = True
Else
c1.Checked = False
c2.Checked = False
c3.Checked = False
c4.Checked = False
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked Then
c1.Enabled = True
c2.Enabled = True
c3.Enabled = True
c4.Enabled = True
all.Enabled = True
Else
c1.Enabled = False
c2.Enabled = False
c3.Enabled = False
c4.Enabled = False
all.Enabled = False
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
----------------------------------------------------------------------------
Text3.Text = Val(Text1.Text) + (Text2.Text)
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team