Cod sursa(job #3366467)
| Utilizator | Data | 1 octombrie 2026 18:23:42 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string.h>
using namespace std;
int main()
{
ifstream fin("adunare.in");
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);
ofstream fout("adunare.out", std::ios_base::app | std::ios_base::out);
fout.close();
return 0;
}
