#include <cstdio>
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#include <set>
#include <numeric>
#include <ctime>
#include <iostream>
using namespace std;
int main()
{
int pos = 0;
int longest = 0;
string sentences[105];
while (getline(cin, sentences[pos]))
{
if (sentences[pos].size() > longest)
longest = sentences[pos].size();
pos++;
}
for (int i = 0; i < longest; i++)
{
for (int j = pos - 1; j >= 0; j--)
{
if (sentences[j].size() > i)
printf("%c",sentences[j][i]) ;
else
printf(" ");
}
printf("\n");
}
}
#include <cstring>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <map>
#include <sstream>
#include <cmath>
#include <bitset>
#include <utility>
#include <set>
#include <numeric>
#include <ctime>
#include <iostream>
using namespace std;
int main()
{
int pos = 0;
int longest = 0;
string sentences[105];
while (getline(cin, sentences[pos]))
{
if (sentences[pos].size() > longest)
longest = sentences[pos].size();
pos++;
}
for (int i = 0; i < longest; i++)
{
for (int j = pos - 1; j >= 0; j--)
{
if (sentences[j].size() > i)
printf("%c",sentences[j][i]) ;
else
printf(" ");
}
printf("\n");
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন