# Visual Basic Programming Code Examples

## Visual Basic > Applications VBA Code Examples

### use wordwrapping while printing textbox

C Find Sum of Natural numbers in a range -
Give a meaningful name to the function, say sumOfNaturalNumbers(). The function must accept two inputs i.e. the lower & upper limit to find sum. Pass two integer parameters to

Enters Student Marks and Find Percentage -
Write a C program code to input marks of five subjects Computer, Chemistry, Mathematics, Biology, Physics & Calculate Percentage and grade according to given conditions. Student

C++ Program Implement ScapeGoat Tree -
Function to check if "tree is empty". Function to count number of "nodes recursively". And function to search for an element. Function to search for an element recursively. Function

Switch Case Statement in C Programming -
The Switch Case statement is used when we have multiple options & we need to perform a different task for each option. Case doesnt always need to have order 1, 2, 3 and so on...

Implementing the Bin Packing Algorithm -
This is a sample program to illustrate the Bin-Packing algorithm using next fit heuristics. In the bin packing problem, objects of different volumes must be packed into a finite number

C++ Implements Queue using Linked List -
C++ program, "using iteration", implements the list of elements removed from the queue in first in first out mode using a Linked list. A linked list is an ordered set of data elements,

Find Second Largest & Smallest Elements -
C Program finds second largest & smallest elements in an array. The program sorts the array in an descending order. Then it finds the second largest and smallest element in

Park-Miller Random Numbers Generation -
C++ Program to generate 'random' numbers using Park-Miller algorithm. general formula of a random number generator (RNG) of this type is: 'X_{k+1} = g X(k) mod n'. To generate