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

04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-maznabili
 
04. Console Input Output
04. Console Input Output 04. Console Input Output
04. Console Input Output Intro C# Book
 
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 JobyGrejoJoby1
 
Unit 1 of c++ first program
Unit 1 of c++ first programUnit 1 of c++ first program
Unit 1 of c++ first programAKR Education
 
c++basics.ppt
c++basics.pptc++basics.ppt
c++basics.pptEPORI
 
030 cpp streams
030 cpp streams030 cpp streams
030 cpp streamsHồ Lợi
 
Practical basics on c++
Practical basics on c++Practical basics on c++
Practical basics on c++Marco Izzotti
 
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 sequencesssuserf86fba
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
 
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) Aman Deep
 
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)Aman Deep
 
4 operators, expressions & statements
4  operators, expressions & statements4  operators, expressions & statements
4 operators, expressions & statementsMomenMostafa
 

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

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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 educationjfdjdjcjdnsjd
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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...Miguel Araújo
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

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