Saturday, August 11, 2018

Divisor Program in C++

A very simple divisor program that I wrote using C++ using if - else statement.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work, computer tutorials and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.





Sample Program Output




Program Listing

divide.cpp

#include <iostream>

using namespace std;

int main() { 

int dividend=0, divisor=0;

// Get two integers from the user 
cout << "Divisor Program in C++";
cout << "\n\n";
cout << "Please enter two integers to divide:"; 
cin >> dividend >> divisor; 
// If possible, divide them and report the result 
if (divisor != 0) {
cout <<"\n\n";
cout << dividend << "/" << divisor << " = " << dividend/divisor << '\n'; 
}
else {
cout <<"\n\n";
cout << "Division by zero is not allowed\n";
}
cout <<"\n\n";
cout << "End of Program";
}


1 comment:

  1. Very excellent post.The knowledge you have been sharing through this post is very helpul to bring up new ideas and to innovate big things.I suggesst everyone to go through this blog,you not only get knowledge on it but enjoy reading the post.Thanks for sharing.
    Python Certification Course in Bangalore

    ReplyDelete