Search
 
SCRIPT & CODE EXAMPLE
 

CPP

how to get double y dividing 2 integers in c++

int a {10}, b {3};            //output : 3.333
double c {};
c = static_cast<double>(a)/b;
cout<<c;
Comment

PREVIOUS NEXT
Code Example
Cpp :: retu7rn this c++ 
Cpp :: convert string to char c++ 
Cpp :: make random nuber between two number in c++ 
Cpp :: remove at index vector c++ 
Cpp :: convert decimal to binary c++ 
Cpp :: fork c 
Cpp :: c++ check if string contains uppercase 
Cpp :: c++ file exists 
Cpp :: format string cpp 
Cpp :: dynamically generating 2d array in cpp 
Cpp :: sort function descending c++ 
Cpp :: infinite loop c++ 
Cpp :: min vector c++ 
Cpp :: C++ Program to Reverse an Integer 
Cpp :: c++ program to take input from user 
Cpp :: allow cross origin 
Cpp :: chrono library c++ 
Cpp :: c++ hide show console 
Cpp :: print vector of vector c++ 
Cpp :: memcpy c++ usage 
Cpp :: how to declare a function in c++ 
Cpp :: delete a node from binery search tree c++ 
Cpp :: c++ get environment variable 
Cpp :: ray sphere intersection equation 
Cpp :: how to rotate canvas android 
Cpp :: sort 0 1 2 leetcode 
Cpp :: tolower funciton in cpp 
Cpp :: c++ vector initialization 
Cpp :: vector::insert 
Cpp :: overload of << c++ 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =