#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const int MAX = 100;
/*
int analys(char a[MAX])
{
int ANSW, i;
char coef_c;
for (i = 0; i < strlen(a); i++)
{
if (a[i] == 'x' && (a[i + 1] == '-' || a[i + 1] == '+'))
ANSW = 1;
}
}*/
void main()
{
int len, i;
char a[MAX],
b[MAX] = "+";
len = strlen(a);
scanf("%s", &a);
if (a[0] != '+')
{
strcat(b, a);
}
else for (i = 0; i < len; i++)
b[i] = a[i];
puts(b);
getchar();
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.