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

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 15-12-2009, 11:22 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
Cool Factorial Series (SIMPLE,EXTENDED) Visual Basic Console Application Code By Wasif

Factorial Series (SIMPLE)
Code:
Module Module1
   
   Sub Main()
   
   Dim factorial As Integer
   
   For n = 1 To 5
              factorial = 1
   For m = 1 To n
   
                  factorial = factorial * m
   
   
   Next
   If n = 1 Then
                  Console.Write(factorial)
   Else
                  Console.Write("+" & factorial)
   End If
   
   Next
   
   
   End Sub
   
  End Module


Factorial Series (EXTENDED)
Code:
  
  Module Module1
   
   Sub Main()
   
   Dim buffer As String
   Dim factorial As Integer
   Dim buffer2 As String
   
          buffer = ""
          buffer2 = ""
   For n = 1 To 5
              factorial = 1
   For m = 1 To n
                  factorial = factorial * m
   Next
   
   If n = 5 Then
                  buffer2 = buffer2 & n & "!"
                  buffer = buffer & factorial
   
   ElseIf n <> 5 Then
                  buffer = buffer & factorial & " + "
                  buffer2 = buffer2 & n & "! + "
   End If
   
   
   Next
   
          Console.WriteLine("Factorial Series : " & buffer2 & "=" & buffer)
   End Sub
   
   
  End Module

__________________
(`v)
`*..*`

.*.*) .*)
(.* (.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
Reply

Tags
application, basic, code, console, extended, factorial, series, simple, visual, wasif


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

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Factorial and Power Series using Visual Basic code By Wasif Laeeq .BZU. Visual Programming 0 15-12-2009 11:52 PM
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
Introduction to Visual Basic Programming - Chapter number 3 Visual Programming by Deitel BSIT07-01 Visual Programming 0 20-10-2009 12:45 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

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 03:31 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.