Cod sursa(job #3154419)
Utilizator | Data | 4 octombrie 2023 17:34:54 | |
---|---|---|---|
Problema | Evaluarea unei expresii | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <iostream>
#include <cstring>
using namespace std;
char s[256];
int main()
{
cin.getline(s, 256);
int n;
cin >> n;
bool ok = 0;
char* p = strtok(s, " ");
while (p)
{
int val = strlen(p);
if (n == val)
ok = 1, cout << p << "\n";
p = strtok(NULL, " ");
}
if (ok == 0)
cout << "nu exista";
return 0;
}