Tags » Header Files

HEADER FILE HAVING AN OVERLOADED VERSION OF A FUNCTION FOR CALCULATONG A NUMBER TO THE POWER OF ANOTHER

//HEADER FILE HAVING MATHS RELATED FUNCTIONS

#ifndef _POWER_H
#define _POWER_H

float pow(float num, int power)
{
float val = 1.0;
for(int i=0; i<power; i++)
{ 24 more words

Header Files

HEADER FILE HAVING FUNCTION TO CALCULATE SUM OF DIGITS OF A NUMBER

#ifndef diksha1_H
#define diksha1_H

int sum(int num)
{
int val = 0;

while(num)
{
val += num%10;
num /= 10;
}

return val;
}

#endif

Header Files

HEADER FILE TO CALCULATE FACTORIAL OF A NUMBER

// MY HEADER FILE DIKSHA.H

#ifndef _diksha_h
#define _diksha_h

int fact(int num)
{
int val = 1;

for(; num>0; num–)
val *= num;
return val;
}

#endif

Header Files

HEADER FILE HAVING CLASS DEFINITION OF EMPLOYEE CLASS

// HEADER FILE HAVING EMPLOYEE CLASS DEFINITION

#ifndef _CLASS_H
#define _CLASS_H
#include <stdio.h>

class employee
{
char name;
int empid;
long salary;

public:
void read() 67 more words

Header Files

A Simple Calculator

Today we are going to show you how to make a simple calculator using c++ . We would discuss complex calculator in the next edition. 623 more words

Coding

Lets Learn To ADD Two Numbers

In this Blog we will learn about how to Add two Numbers.

Firstly I will Show you the Program

Look Carefully 507 more words

Coding

Hello world Without Semi Colon(;)

In the last blog we have seen that a Semi Colon (;) is used to end a command line in C++.

So can we RUN a program which never uses a semi colon? 374 more words

Coding