Coding Practice: Write a program in VB.NET to calculate summation of 3 integer numbers

in hive-185836 •  3 years ago 

coding.jpg

Problem: Write a program in VB.NET to calculate summation of 3 integer numbers

689
56
211

ok, this program demonstrates how to find out the sum of three integer numbers and print the result on computer screen.".

So, let's do it --

Module SummationInteger

'Write a program in C to calculate the summation of following three integer numbers and display the result on computer screen display

    '689
    '56
    '211
    
'Programmed by Phantom

   Sub Main() 'main function
   
      Dim numb1, numb2, numb3 As Integer 'local variable declaration
      Dim sum As Integer
    
      numb1 = 689 'Assign value to first integer
      numb2 = 56 'Assign value to second integer
      numb3 = 211 'Assign value to third integer
    
      sum = numb1 + numb2 + numb3 'calculate summation of the given three integer numbers
    
      Console.WriteLine("The summation of {0}, {1} & {2}  is {3}", numb1, numb2, numb3, sum) 'print the result on the computer screen
      
      Console.ReadLine()
   End Sub
End Module 'End of program

Output

The summation of 689, 56 & 211  is 956

Do it yourself on online VB.NET compiler: https://www.tutorialspoint.com/compile_vb.net_online.php

Or, download VB.NET
Download VB.NET for Windows 7, 8, 8.1 and Windows 10 (32-64 bit) with full/window screen mode and many more extra feature

Tomorrow I'll post another VB.NET problem with solution.
Have a nice day.
Thank you very much.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!