mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-27 20:14:04 +08:00
filenames and namespace fixes
This commit is contained in:
@@ -5,7 +5,7 @@ int main() {
|
||||
int n;
|
||||
std::cout << "Enter value of n:" << std::endl;
|
||||
std::cin >> n;
|
||||
int a[n];
|
||||
int *a = new int[n];
|
||||
int i, j, gcd;
|
||||
std::cout << "Enter the n numbers:" << std::endl;
|
||||
for (i = 0; i < n; i++) std::cin >> a[i];
|
||||
@@ -18,5 +18,6 @@ int main() {
|
||||
gcd = a[j] % gcd; // calculating GCD by division method
|
||||
}
|
||||
std::cout << "GCD of entered n numbers:" << gcd;
|
||||
delete[] a;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
const long long MAX = 93;
|
||||
|
||||
@@ -31,7 +30,7 @@ long long fib(long long n) {
|
||||
int main() {
|
||||
// Main Function
|
||||
for (long long i = 1; i < 93; i++) {
|
||||
cout << i << " th fibonacci number is " << fib(i) << "\n";
|
||||
std::cout << i << " th fibonacci number is " << fib(i) << "\n";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user