Answers for "integer type casting c++"

C++
0

type casting in cpp

int main()
{
	int a=20 , b= 25 , c= 19;
  	int sum = a + b + c;
  	float ave = (float) sum / 3;  //this is called type casting (float) sum 
  	cout<<"Average is : "<<ave<<endl;
  	return 0;
}
Posted by: Guest on September-14-2021
-1

casting cpp

casting
Posted by: Guest on August-02-2021

Browse Popular Code Answers by Language