题目:
#include#include int GetExp(char s[],int n);int main(){ char isign,esign; int integer,e; char decpart[10000],expart[40]; scanf("%c%d.%[0-9]E%c%s",&isign,&integer,decpart,&esign,expart); if(isign=='-')printf("-"); int exp=GetExp(expart,strlen(expart)); //printf(" ",exp); if(exp==0){ printf("%d.%s",integer,decpart); } else{ if(esign=='+'){ printf("%d",integer); if(strlen(decpart)>exp){ int i=0; while(exp!=0){ printf("%c",decpart[i++]); exp--; } printf("."); while(i 0){ printf("0"); exp--; } } } else { printf("0."); exp--; while(exp>0){ printf("0"); exp--; } printf("%d%s",integer,decpart); } }}int GetExp(char s[],int n){ int i,m=0; for(i=0;i