Home C / C++

# C / C++

### Fractional Calculator in C++

We can easily use structures to create a fractional calculator than can solve fractional numbers in C++. It is just an easy approach through structures, we can easily create a simple...

### Drawing a Triangle in Console window

Here is a C++ code containing nested loops which is able of drawing a triangle in your console window.We can use loops easily to draw many structures in our console window,...

### Binomial Coefficients in C++

How we implement a logic to find out the binomial coefficients of an entered number by the user in C++?. Look at the below code: # include <iostream> ...

### A Simple Calculator in C++

If we want to create a simple calculator in C++ which is able to operate simple arithmetic operations  like addition, subtraction, multiplication and division. again here is an example of applications...

### Creating a Timer in C++

Creating a timer means creating a digital watch, simply. A Digital watch is the one that counts and shows the time in form of digits, In our daily bases software Programming...

### McCarthy 91 function in C++

McCarthy 91 function is a recursive function used within computer science, its definition is: Now how we implement this McCarthy 91 function in our C++ code,  have a look at the below...

### Converting lowercase to uppercase in C++

Here we are converting lowercase to uppercase in C++ by using an additional library in our includes;Here is a code which is able of converting a string from lowercase to uppercase: // converting lowercase to uppercase in C++ #include <iostream> #include <cctype> using namespace std; void convertToUppercase( char * );   int main() {     char phrase = "characters and \$32.98";     cout << "The phrase before conversion is: " << phrase;     convertToUppercase( phrase );     cout << "nThe phrase after conversion is:  "         << phrase << endl;     return 0;  // indicates successful termination }   // convert string to uppercase letters void convertToUppercase( char *sPtr ) {     while ( *sPtr != '' ) {   // current character is not ''         if ( islower( *sPtr ) )  // if character is lowercase,             *sPtr = toupper( *sPtr );  // convert to uppercase         ++sPtr;  // move sPtr to next character in string     } } in...

### Comparing two Numbers in C++

Here we are going to look at an example which is able of comparing two numbers in C++. In future we might need a simple code for comparing two integers to...

### Fibonacci Number program in C++ using Recursion

This program shows A Fibonacci Sequence starting from a user's entered number, the approach used here is recursive.Have a look at the code: //febonacci using recursion ...

### Generating Prime Numbers in C++

Now implementing this logic of Prime Numbers into our c++ code, we need simple for loops and conditional statements. This is very easy to implement and print Prime Numbers upto 1000....

0Fans
20Followers
4,524Followers