Commit dd52b42a authored by vgsb18's avatar vgsb18 🦍

Primeiro up

parents
File added
#include <stdio.h>
#include "class.h"
int main()
{
if (avalia_sequencia())
printf("SIM\n");
else
printf("NAO\n");
return 0;
}
\ No newline at end of file
#include "class.h"
#include <stdio.h>
char repetidor(char rep, int *val)
{
char y;
printf("times\n");
if (rep != '0')
{
char end;
if (rep == '(')
end = ')';
else if (rep == '[')
end = ']';
else if (rep == '{')
end = '}';
else
return '0';
scanf(" %c",&y);
printf("heyy\n");
if (repetidor(y,val) == end)
*val = 1;
}
return y;
}
int *avalia_sequencia()
{
char x;
char z;
scanf("%c",&x);
int *validate = 0;
repetidor(x,validate);
return validate;
}
\ No newline at end of file
#ifndef __CLASS__
#define __CLASS__
char repetidor(char rep, int *val);
int *avalia_sequencia();
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment