This file contains 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 <string.h> | |
using namespace std; | |
int main() { | |
char s[101],c[101]; | |
cin.get(s,100); | |
cin.get(); |
This file contains 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 <fstream> | |
#include <string.h> | |
using namespace std; | |
int main() { | |
ifstream f("bac.txt"); | |
long prima_aparitie[10], nr = 0, lungime[10], maxim = 0; |
This file contains 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 echilibrat(long n) { | |
char pozitie = 0; //0 daca sunt pe poz. para si 1 altfel | |
int suma_par = 0, suma_impar = 0; | |
while (n > 0) { |
This file contains 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 <string.h> | |
using namespace std; | |
/** | |
* Functie ce imi verifica daca un caracter | |
* este cifra. Intorc 1 daca e cifra si 0 daca nu e. | |
*/ | |
int isDigit(char c) { |
This file contains 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 <fstream> | |
using namespace std; | |
int main() { | |
ifstream f("date.in"); | |
int prec,a,urm,nr = 0; | |
f >> a; |
This file contains 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 n,m,a[24][24],i,j,k = 1; | |
cin >> n >> m; | |
for (j = 0; j < m; j++) |
This file contains 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 n,a[25][25],i,j; | |
cin >> n; | |
for (i = 1; i <= n; i++) | |
for (j = 1; j <= n; j++) |
This file contains 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 n,a[25][25],i,j; | |
cin >> n; | |
for (i = 1; i <= n; i++) |
This file contains 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 <fstream.h> | |
ifstream fin("sir.txt"); | |
void main() { | |
int x, k, a, b, c; | |
char cif; | |
fin >> x >> k; | |
if (x == 9) { | |
a = 1; | |
b = 2; | |
} else if (x < 9) |
This file contains 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 <fstream.h> | |
fstream f("date.in", ios::in); | |
fstream g("date.out", ios::out); | |
void main() { | |
int i, j, n; | |
long a[100][100]; | |
long max = 1000000000; | |
f >> n; | |
for (i = 1; i <= n; i++) | |
for (j = 1; j <= n; j++) |