> Search Program FPB in Dev C++ | krehstorrs
NEW POST | Welcome to Krehstorrs Blog
Home » , » Search Program FPB in Dev C++

Search Program FPB in Dev C++

Search Program FPB in Dev C++ - Here I will share a little program to find the FPB that you can use in the program Dev C + +. The program is intended to find the value of the data input of our own.

To the program you can copy the following :

#include<iostream.h>//description of the calling cout and cin
#include<conio.h>//description of the calling getch

class fpb{
      public:
             fpb();
      private:
              int a,b,value;//decription of a, b, and the result (value)
              };
              
fpb::fpb(){
           cout<<"Search Program Counting FPB"<<endl;
           cout<<"input values A = ";
           cin>>a;
           cout<<"input values B = ";
           cin>>b;
           
            value=a%b;
              while(value !=0){
                          a=b;
                          b=value;
                          value=a%b;
                          }
              cout<<"values FPB for A anf B is = "<<b<<endl;
           }


int main(){
    fpb();
    getch();
    }


Screenshot of the results you can see below:

Search Program FPB in Dev C++
Search Program FPB in Dev C++

To download the script, click on this link
You have just read an article that category C Plus Plus / Programing by title Search Program FPB in Dev C++. You can bookmark this page with the URL http://krehstorrs.blogspot.com/2013/03/search-program-fpb-in-dev-c.html Thank you!
Share this article :

0 comments:

Post a Comment

 
Support : Home | Sitemap | Privacy | Link List
Copyright © 2013. krehstorrs - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger