# Visual Basic Programming Code Examples

## Visual Basic > Code Snippets Code Examples

### Factorial function

C Evaluating Subtraction of Two Matrices -
Before accepting the Elements Check if no of rows and columns of both matrices is equal. Accept the Elements in Matrix 1. Accept the Elements in Matrix 2. Subtraction of two...

Writing Comment in C program examples -
Commenting in C programming language. This is a using single line comment example. This is a using mult-line comment. Slash that's not a commment, divide operator...

C Code Find the GCD & LCM of 2 Integers -
C Program calculates the GCD and LCM of 2 integers. Here gcd means greatest common divisor. For two integers a and b, if there are any numbers d so that a / d and b / d doesn't

C Language Codes Calculate Profit or Loss -
C Program coding input cost price and selling price of a product & check profit or loss. Logic to find profit or loss. In primary mathematics classes, you all have learned about profit and

Implementation for Top-Down Splay Tree -
Finding the smallest item in the tree. Not the most efficient implementation ('two passes'), but has correct "amortized behavior". A good alternative is to first call Find with parameter

Perimeter of a Circle Rectangle & Triangle -
This C Program calculates the perimeter of a circle, rectangle and triangle. This program is used to find the perimeter of circle, rectangle and triangle. Perimeter of rectangle: 2 *(x+y)

C Language Reading Writing Binary Files -
File I/O for Binary files in C. Pointers for both binary files. Open for binary2.exe file in rb mode. Test logic for successful open. Open file binary2.exe in "wb" mode for writing and

C Language Program Implement Cyclesort -
C Program implements 'Cyclesort'. Cycle sort is an in-place, unstable 'Sorting Algorithm', a comparison sort that is theoretically optimal in terms of the total number of writes to the