Getting simulation - (string processing) B1009 ironic

 

 

#include <bits/stdc++.h>
#include<math.h>
using namespace std;
const int MAX_LEN = 105;
//const int MAX_D = 31;
//char temp[MAX_LEN];
//vector<char> result;
//char temp1[120];
int main(){
    /*temp1[0] =' ';
    for(int i =1;i<MAX_LEN;++i){
    temp[i] = '9';
    }
    cin>>temp;
    strcat(temp1,temp);
    for(int i=MAX_LEN;i<120;++i){
        temp1[i] = '9';
    }
    int = 0 for;
    int sec=0;
    
    for(int i=119;i>=0;i = sec - 2){
        for i =;
         while(temp1[fir] == '9'){
             fir--;
         }
         sec = for;
         while(temp1[sec-1] != ' '){
             sec--;
         }
         int = firtemp for;
         sectemp = int sec;
         for(int i=sec;i<=fir;++i){
             char t = temp1[i];
             result.push_back(t);
         }
         result.push_back(' ');
    }
    for(int i=0;i<result.size()-1;++i){
        cout<<result[i];
    }*/
    char str[90];
    gets(str);
    int len = strlen (STR), R & lt = 0 , h = 0 ; // R & lt row, h is the column 
    char ANS [ 90 ] [ 90 ]; // ANS [R & lt] stored word 
    for ( int I = 0 ; I <len; ++ I) {
         IF (STR [I] =! '  ' ) {
            ans[r][h++] = str[i];
        }else{
            r++;
            h = 0;
            ans[r][h] = '\0';
        }        
    }
    for(int i = r;i>=0;--i){
        cout<<ans[i];
        if(i > 0){
            cout<<" ";
        }
    } 
    system("pause");
    return 0;
} 

Guess you like

Origin www.cnblogs.com/JasonPeng1/p/12143161.html