BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

Register FAQ Community Calendar New Posts Navbar Right Corner
HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 5th Semester > Visual Programming

Visual Programming Sir Ahsan


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-10-2009, 09:31 PM
.BZU.'s Avatar


 
Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,693
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
Not Matter Assignmnet#1; Arithmetic operation using VB Console Application

Arithmetic operation using VB Console Application
Code:
Module modmathemat
    Sub Main()


        ' variables for storing user input
        Dim firstNumber, secondNumber As String

        ' variables used in addition calculation
        Dim number1, number2, Answers As Integer

        ' read first number from user
        Console.Write("Please enter the first number: ")
        firstNumber = Console.ReadLine()

        ' read second number from user
        Console.Write("Please enter the second number: ")
        secondNumber = Console.ReadLine()

        ' convert input values to Integers    
        number1 = firstNumber
        number2 = secondNumber

        Answers = number1 + number2 ' add numbers

        ' display sum
        Console.WriteLine("The sum is {0}", Answers)

        Answers = number1 * number2 ' Multiply numbers

        ' display product    
        Console.WriteLine("The product is {0}", Answers)


        Answers = number1 \ number2 ' Float division of the numbers

        ' display float division result
        Console.WriteLine("The answer after float division of given numbers is {0}", Answers)


        Answers = number1 / number2 ' division of the numbers

        ' display division result
        Console.WriteLine("The answer after division of given numbers is {0}", Answers)

        Answers = number1 ^ number2 ' Power of numbers numbers

        ' display Power of given numbers
        Console.WriteLine("The power of {0} and {1} is {2}", number1, number2, Answers)

        Console.Write("Please press  enter to close this Applcation")
        firstNumber = Console.ReadLine()

    End Sub ' Main

End Module ' modmathemat


Attached Files
File Type: rar Arithmetic operation using VB Console Application.rar (153.8 KB, 56 views)
__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
  #2  
Old 04-10-2009, 10:22 PM
BSIT07-01's Avatar
Addicted to Computer


 
Join Date: Sep 2007
Location: ------------
Age: 34
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
BSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant future
Default Re: Assignmnet#1; Arithmetic operation using VB Console Application

Here is a TINY version for you to understand :D

Code:
Module Module1

    Sub Main()
        Dim var1, var2, var3 As Decimal
        Console.Write("Please Type the first Variable Value:")
        var1 = Console.ReadLine()
        Console.Write("Please Type the 2nd Variable Value:")
        var2 = Console.ReadLine()

        var3 = var1 * var2
        Console.WriteLine("{0} x {1} = {2}", var1, var2, var3)
        var3 = var1 / var2
        Console.WriteLine("{0} / {1} = {2} (Float Point Division)", var1, var2, var3)
        var3 = var1 \ var2
        Console.WriteLine("{0} \ {1} = {2} (Integer Division)", var1, var2, var3)
        var3 = var1 ^ var2
        Console.WriteLine("{0} ^ {1} = {2} ", var1, var2, var3)
    End Sub

End Module
Name:  output.PNG
Views: 339
Size:  4.3 KB
Reply With Quote
Reply

Tags
application, arithmetic, assignmnet#1, console, operation


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Series (SIMPLE,EXTENDED) Visual Basic Console Application Code By Wasif .BZU. Visual Programming 0 15-12-2009 11:25 PM
Assignment Q1:Add two matrices of 2x3 using vb console Application shmsa Visual Programming 1 10-12-2009 08:01 AM
Assignmnet#2.3; Display ODD number between 1 to 100 using VB Console Application .BZU. Visual Programming 1 12-10-2009 02:56 PM
Assignmnet#2.2; Identify given number odd/even using VB Console Application .BZU. Visual Programming 0 11-10-2009 09:26 PM
Assignmnet#2.1; Display Table of giving number using VB Console Application .BZU. Visual Programming 0 11-10-2009 08:59 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 01:47 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.