This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Example of `prototype' design pattern. | |
| * Copyright (C) 2011 Radek Pazdera | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * This program is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream> | |
| using namespace std; | |
| class date | |
| { | |
| private: | |
| int day; | |
| int month; | |
| int year; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std ; | |
| class naturalNo | |
| { | |
| private : | |
| int num ; | |
| public : | |
| void setdata (int a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream > | |
| #include <cstring> | |
| using namespace std ; | |
| class library | |
| { | |
| private : | |
| int bookNo ; | |
| string Author ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| // C function for extended Euclidean Algorithm | |
| int gcdExtended(int a, int b, int *x, int *y) | |
| { | |
| // Base Case | |
| if (a == 0) | |
| { | |
| *x = 0; | |
| *y = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream> | |
| #include<conio.h> | |
| #include<stdlib.h> | |
| using namespace std; | |
| int gcd(int u, int v) | |
| { | |
| return (v != 0) ? gcd(v, u % v) : u; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int rem, quot ; | |
| int hcf (int, int) ; | |
| int main() | |
| { | |
| cout << "Input two numbers : "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int rem, quot ; | |
| int hcf (int, int) ; | |
| int main() | |
| { | |
| cout << "Input two numbers : "; | |
| int a, b, num1, num2, hcf_num ; | |
| /* cin >> a, b ; //USING COMMA IS A SYNTAX ERROR */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int noOfStu, i; | |
| cout << "Enter the number of Students in a Class : "; | |
| cin >> noOfStu ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int functCall (); | |
| int main () | |
| { | |
| int howMany , i, result; | |
| cout << "How many time do you wan to call function : "; |
NewerOlder