you can also divide numbers having decimal point using this program. c++ code - #include<iostream.h> #include<conio.h> void main() { clrscr(); float a,b,c; cout<<"\n enter a="; cin>>a; cout<<"\n enter b="; cin>>b; c=a/b; cout<<"\n division="<<c; getch(); } OUTPUT enter a=56 enter b=7 division=8 Similar posts - 1- C++ program to find the absolute value of a number. 2- C++ program to find the reverse of a number. 3- c++ program to swap two numbers using pointers 4- C++ program to print a pyramid of stars
Posts
you can also use this program to add numbers having decimal point. c++ code is given below- #include<iostream.h> #include<conio.h> void main() { clrscr(); float a,b,c; cout<<"\n enter a="; cin>>a; cout<<"\n enter b="; cin>>b; c=a+b; cout<<"\n addition="<<c; getch(); } OUTPUT enter a=5 enter b=7 addition=12 similar posts - 1- C++ program to find the average. 2- C++ program to convert a length given in feet and inches to centimeters. 3- C++ program to calculate no. of even and odd numbers in a given array. 4- C++ program to find the absolute value of a number.