Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ float and double

float area = 64.74;
double volume = 134.64534;
Comment

C++ float and double simple example

#include <iomanip>
#include <iostream>
using namespace std;

int main() {
    // Creating a double type variable
    double a = 3.912348239293;

    // Creating a float type variable
    float b = 3.912348239293f;

    // Printing the two variables
    cout << "Double Type Number  = " << a << endl;
    cout << "Float Type Number  = " << b << endl;

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: practice problems for nested loops in c++ 
Cpp :: can i delete a null pointer in c++ 
Cpp :: jquery datepicker default date not working 
Cpp :: c++ localtime unsafe 
Cpp :: cout ascii art c++ 
Cpp :: c to c++ code converter 
Cpp :: open url from dev cpp 
Cpp :: beecrowd problem 1001 solution in c++ 
Cpp :: CodeChef Starters 30 Division 4 (Rated) Swapping Chefs Way 
Cpp :: ternary operator rsut 
Cpp :: c++ x y in arrau 1d 
Cpp :: https://stackoverflow.comInstance of a Character in a String c++ 
Cpp :: Increase IQ codechef solution in c++ 
Cpp :: c++ to mips assembly converter 
Cpp :: Write a CPP program to calculate sum of first N natural numbers 
Cpp :: Catcoder mars rover solution in c++ 
Cpp :: int to string Using boost::lexical_cast 
Cpp :: easy way to encrypt a c++ file line by line 
Cpp :: stack using cpp 
Cpp :: matrix chainmultiplication 
Cpp :: avl tree c++ 
Cpp :: Browse Folder Dialog, Search Folder and All Sub Folders using C/C++ 
Cpp :: C++ Function-style Casting 
Cpp :: 01matrix 
Cpp :: assignment of single field in struct in solidity 
Cpp :: play sound opencv video c++ 
Cpp :: yearly interest calculator c++ using for loop 
Cpp :: c++ vs c# 
Cpp :: c++ union set q5 
Cpp :: Check if two stacks are the same using C++ 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =