Skip to content

Instantly share code, notes, and snippets.

View AlexandruFilipescu's full-sized avatar
🎯
Focusing

Filipescu Alexandru AlexandruFilipescu

🎯
Focusing
View GitHub Profile
@AlexandruFilipescu
AlexandruFilipescu / .cpp
Last active June 9, 2019 16:56
C++ Cel mai mare si cel mai mic numar prim + Suma numerelor care au cifrele in ordine crescatoare (C ++ Highest and lowest prime numbers + Sum of numbers that have the figures in ascending order)
#include <iostream>
using namespace std;
int main() {
// Cel mai mare si cel mai mic numar prim
int i, j, n,m,temp,copie,s,prim_mic,prim_mare;
prim_mic = INT_MAX;
prim_mare = INT_MIN;
bool necrescator;
bool prim;
@AlexandruFilipescu
AlexandruFilipescu / .cpp
Last active June 9, 2019 16:56
C++ Problema verificare a 2 numere daca se regasesc toate dintr-o cifra, in cealalta(Problem that verifies if a number has the same figures with another number)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n,m,v,w,a,b;
string str;
bool egale;
cin >> n >> m;
v = n;
@AlexandruFilipescu
AlexandruFilipescu / .cpp
Last active June 9, 2019 16:57
C++ Matrice parcursa cu un singur FOR V2(C++ matrix looped with single FOR)
#include <iostream>
using namespace std;
int matrice[50][50],l,c,k,j;
int main() {
cout << "Introduceti numarul de linii: ";
cin >> l;
cout << "\nIntroduceti numarul de coloane: ";
cin >> c;
@AlexandruFilipescu
AlexandruFilipescu / .cpp
Last active June 9, 2019 16:57
C++ Prof Constantinescu Matrice inmultita(Matrix multiplication)
#include <iostream>
using namespace std;
int main() {
int *q, *p, *r, k,y,l,c,total, matrice[100][100];
cout << "Introduceti liniile si coloanele matricelor: ";
cin >> l >> c;
total = l * c;
@AlexandruFilipescu
AlexandruFilipescu / .cpp
Last active June 9, 2019 16:57
C++ Se citesc numere intregi de la tastatura pana la intalnirea unui numar negativ. Afisati numarul citit care are cei mai multi divizori(Full numbers are read from the keyboard until a negative number is encountered. Display the read number that has the most divisors.).
#include <iostream>
using namespace std;
int main() {
int a,n,i, nr_afisare, nr_divizori;
nr_divizori = 1;
n = 0;
a = 0;
nr_afisare = 0;
while (n>= 0) {