fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char** argv) {
  4. char nome[100], num1[100];
  5. int i;
  6. scanf("%s", nome);
  7.  
  8. for(i = 0; nome[i] != '\0' && nome[i] !='+'; i++) {
  9. num1[i] = nome[i];
  10. }
  11. num1[i] = '\0';
  12. printf("%s\n", num1);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 4256KB
stdin
stack+
stdout
stack