Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2012 [RESOLVED] Console Application - Skipping Lines

$
0
0
Hey everyone.

I'm writing a console application, and I need my program to look like this:
Name:  Capture.PNG
Views: 36
Size:  6.2 KB

But right now, it looks like this:
Name:  Capture2.PNG
Views: 32
Size:  3.5 KB

I need to skip a line, and add currency symbols to my decimal variables.

Here's my code so far:
Code:

Sub Main()
        Dim name As String
        Dim hours As Integer
        Dim parts As Decimal

        hours = 35

        Dim labourcost As Decimal

        Console.Write("Enter customers name: ")
        name = Console.ReadLine()

        Console.Write("Enter number of hours of labour: ")
        labourcost = Console.ReadLine * hours

        Console.Write("Enter cost of parts and supplies: ")
        parts = Console.ReadLine()

        parts.ToString("C")
        labourcost.ToString("C")

        Console.WriteLine("Summary of costs for " & name)
        Console.WriteLine("Labour cost: " & labourcost * 1.05)
        Console.WriteLine("Parts cost: " & parts * 1.05)
        Console.WriteLine("Total cost: " & (labourcost + parts) * 1.05)


        Console.Read()

    End Sub

Attached Images
  

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>