Description

C++ Language

#include<iostream>
using namespace std;

#define PI 3.1415

int main(){
    cout<<"Value of PI : "<<PI<<endl;
    return 0;
}

C Language

#include <stdio.h>
#define PI 3.145
int main()
{
    printf("Value of PI : %.3f", PI);

    return 0;
}

Comments

Login is mandatory to comment Please login

Recommended Posts

Print numbers from 1 to 100 using while loop c and cpp program

C program to print numbers from 1 to 100 using while loop and also c++ program.

How to make swastik in c and cpp programming language

Write a c and c++ program to print the Swastik. How to make Swastik in c and cpp.

User Login System in C programming language

We create a login System program which takes username and password from the user.

Program to print a message without using semicolon in c programming

How to write a c program to print a message without using semicolon in c programming language.

Function call by value in c programming language

The call by value technique of passing arguments to a function copies the particular value of an argument into the formal parameter of the function.

Call by Reference in C programming language

When we call a function and pass the variable / parameter in the function, when passing the address of the actual arguments from the calling function, that's why it is called call by reference.