Advertisement
arturParchem

Ćwiczenie 4 infromatyka.wsip.pl

May 20th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. string ta(string s) {
  4.     char zn=' ';
  5.     string pom="";
  6.     for(int i=0;i<s.size();i++)
  7.      {
  8.         if(s[i]!='A')
  9.             zn='*';
  10.         else
  11.             zn='A';
  12.         pom=pom+zn;
  13.      }
  14.      return pom;
  15. }
  16. int main()
  17. {
  18.     cout<<ta("TGACCCA")<<endl;
  19.     cout<<ta("TGATATTCGATGTGAAAAA");
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement