About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

বুধবার, ১৯ ফেব্রুয়ারী, ২০১৪

URI-1234 Dancing Sentence

link#
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main (){
  char a[10000],b[10000];
  int l,i,f,j;

  while(gets(a)){
      f=1;j=0;
     l=strlen(a);
     for(i=0;i<l;i++){
       if((a[i]>='a'&& a[i]<='z')||(a[i]>='A'&& a[i]<='Z')){
         if(f%2!=0){
           if((a[i]>='a'&& a[i]<='z')){
              a[i]-=32;
          }
        }
       else if(f%2==0){
           if((a[i]>='A'&& a[i]<='Z')){
              a[i]+=32;
       }
        }
       f++;
      }
      b[j]=a[i];
      j++;

    }
    b[j]='\0';
     puts(b);

  }

return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন