SlideShare a Scribd company logo
1 of 14
VB.Net Programming Console Application ,[object Object],[object Object]
The first line of the program indicates the main( ) procedure. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen
These lines create  named  memory locations to store the data entered by the program user. Name is string to store characters Age is integer to store whole numbers Gender is char to store a single character Balance & Interest are decimal to  store numbers with digits after the point. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Name Age Balance Interest Gender
This line writes to the console screen. The words in quotes appear on the screen. Write will display the contents of the quotes and stay on the same line.  Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….: Name Age Balance Interest Gender
This next line reads the line typed by the program user and stores it in the named memory location  Name. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Name Age Balance Interest Jim  Gender
Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub This line writes to the console screen. The words in quotes appear on the screen . Code Narrative Memory Screen Enter Name…….:Jim Enter Age………: Name Age Balance Interest Jim  Gender
This next line reads the line typed by the program user and stores it in the named memory location  Age. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Name Age Balance Interest Jim  23  Gender
This line writes to the console screen. The words in quotes appear on the screen. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………: Name Age Balance Interest Jim  23  Gender
This next line reads the line typed by the program user and stores it in the named memory location  Gender. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Name Age Balance Interest Jim  23  Gender M
This line writes to the console screen. The words in quotes appear on the screen. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..: Name Age Balance Interest Jim  23  Gender M
This next line reads the line typed by the program user and stores it in the named memory location  Balance. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..:100 Name Age Balance Interest Jim  23  100.00 Gender M
This next line uses the contents of  Balance  to calculate 10% of its value and places the answer into the location  Interest . Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..:100 Name Age Balance Interest Jim  23  100.00 10.00 Gender M
These next lines Write the contents of the variables to the console screen. Note  the use of {0} which represents the position of the named variable between the quotes. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Enter Gender. .…:M Enter Balance…..:100 ------------------------------- Name…………:Jim Age……………:23 Gender………..:M Balance………..:100 10% Interest is..:10.00 Name Age Balance Interest Jim  23  100.00 10.00 Gender M
This final line holds the display until the program user presses a key. And this program ends. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name  :") Name = Console.ReadLine() Console.Write("Enter Age  :") Age = Console.ReadLine() Console.Write("Enter Gender  :") Gender = Console.ReadLine() Console.Write("Enter Balance  :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Enter Gender. .…:M Enter Balance…..:100 ------------------------------- Name…………:Jim Age……………:23 Gender………..:M Balance………..:100 10% Interest is..:10.00 Name Age Balance Interest Jim  23  100.00 10.00 Gender M

More Related Content

Similar to Wlkthru vb netconsole-inputoutput

c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
EPORI
 
030 cpp streams
030 cpp streams030 cpp streams
030 cpp streams
Hồ Lợi
 

Similar to Wlkthru vb netconsole-inputoutput (20)

04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-
 
04. Console Input Output
04. Console Input Output 04. Console Input Output
04. Console Input Output
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
2 data and c
2 data and c2 data and c
2 data and c
 
Unit 1 of c++ first program
Unit 1 of c++ first programUnit 1 of c++ first program
Unit 1 of c++ first program
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
C++basics
C++basicsC++basics
C++basics
 
C++basics
C++basicsC++basics
C++basics
 
c++basiccs.ppt
c++basiccs.pptc++basiccs.ppt
c++basiccs.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.ppt
 
07-Basic-Input-Output.ppt
07-Basic-Input-Output.ppt07-Basic-Input-Output.ppt
07-Basic-Input-Output.ppt
 
030 cpp streams
030 cpp streams030 cpp streams
030 cpp streams
 
Practical basics on c++
Practical basics on c++Practical basics on c++
Practical basics on c++
 
PostThis
PostThisPostThis
PostThis
 
Input and output basic of c++ programming and escape sequences
Input and output basic of c++ programming and escape sequencesInput and output basic of c++ programming and escape sequences
Input and output basic of c++ programming and escape sequences
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
4 operators, expressions & statements
4  operators, expressions & statements4  operators, expressions & statements
4 operators, expressions & statements
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Wlkthru vb netconsole-inputoutput

  • 1.
  • 2. The first line of the program indicates the main( ) procedure. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen
  • 3. These lines create named memory locations to store the data entered by the program user. Name is string to store characters Age is integer to store whole numbers Gender is char to store a single character Balance & Interest are decimal to store numbers with digits after the point. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Name Age Balance Interest Gender
  • 4. This line writes to the console screen. The words in quotes appear on the screen. Write will display the contents of the quotes and stay on the same line. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….: Name Age Balance Interest Gender
  • 5. This next line reads the line typed by the program user and stores it in the named memory location Name. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Name Age Balance Interest Jim Gender
  • 6. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub This line writes to the console screen. The words in quotes appear on the screen . Code Narrative Memory Screen Enter Name…….:Jim Enter Age………: Name Age Balance Interest Jim Gender
  • 7. This next line reads the line typed by the program user and stores it in the named memory location Age. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Name Age Balance Interest Jim 23 Gender
  • 8. This line writes to the console screen. The words in quotes appear on the screen. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………: Name Age Balance Interest Jim 23 Gender
  • 9. This next line reads the line typed by the program user and stores it in the named memory location Gender. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Name Age Balance Interest Jim 23 Gender M
  • 10. This line writes to the console screen. The words in quotes appear on the screen. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..: Name Age Balance Interest Jim 23 Gender M
  • 11. This next line reads the line typed by the program user and stores it in the named memory location Balance. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age.........:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..:100 Name Age Balance Interest Jim 23 100.00 Gender M
  • 12. This next line uses the contents of Balance to calculate 10% of its value and places the answer into the location Interest . Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Gender.…………:M Enter Balance…..:100 Name Age Balance Interest Jim 23 100.00 10.00 Gender M
  • 13. These next lines Write the contents of the variables to the console screen. Note the use of {0} which represents the position of the named variable between the quotes. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Enter Gender. .…:M Enter Balance…..:100 ------------------------------- Name…………:Jim Age……………:23 Gender………..:M Balance………..:100 10% Interest is..:10.00 Name Age Balance Interest Jim 23 100.00 10.00 Gender M
  • 14. This final line holds the display until the program user presses a key. And this program ends. Sub Main() Dim Name As String Dim Age As Integer Dim Gender As Char Dim Balance As Decimal Dim Interest As Decimal 'input data Console.Write("Enter Name :") Name = Console.ReadLine() Console.Write("Enter Age :") Age = Console.ReadLine() Console.Write("Enter Gender :") Gender = Console.ReadLine() Console.Write("Enter Balance :") Balance = Console.ReadLine() 'Process Interest = Balance * 10 / 100 'Output Console.WriteLine("-----------------") Console.WriteLine("Name........:{0}", Name) Console.WriteLine("Age....... .. ..:{0}", Age) Console.WriteLine("Gender......:{0}", Gender) Console.WriteLine("Balance.....:{0}", Balance) Console.WriteLine("10% Interest is :{0:f2}", Interest) Console.ReadKey() End Sub Code Narrative Memory Screen Enter Name…….:Jim Enter Age………:23 Enter Gender. .…:M Enter Balance…..:100 ------------------------------- Name…………:Jim Age……………:23 Gender………..:M Balance………..:100 10% Interest is..:10.00 Name Age Balance Interest Jim 23 100.00 10.00 Gender M