Cod sursa(job #3366465)
| Utilizator | Data | 1 octombrie 2026 18:20:23 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string.h>
using namespace std;
int main()
{
ifstream fin("adunare.in");
//ofstream fout("adunare.out");
//fout.close();
int a, b, c;
fin >> a >> b;
c = a + b;
char s1[100] = "echo ";
char s2[100];
char s3[] = " >> adunare.out";
sprintf(s2, "%d", c);
strcat(s1, s2);
strcat(s1, s3);
system(s1);
return 0;
}
