题目

答案
#include<stack>
#include<stdio.h>
using namespace std;
int main()
{
stack<char> s;
char str[100];
int flag=0;
scanf("%s",str);
for(int i=0;str[i];i++)
{
if((str[i]=='-'||str[i]=='+')&&i==0)
printf("%c",str[i]);
else if(str[i]=='.') printf(".");
else if(str[i]>='0'&&str[i]<='9')
{
if(!(str[i-1]>='0'&&str[i-1]<='9')&&str[i-1]

最低0.47元/天 解锁文章
391

被折叠的 条评论
为什么被折叠?



