Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h> /*esta é apenas a biblioteca que guarda os codigos a serem usados*/
- int main (){ /*chama a função principal*/
- char trinca[10], trans[10], ABC[3];
- int nropcao, i=0;
- /*não sei se sao codons mesmo mas vou fazer a logica*/
- printf("ESCOLHA O NUMERO DA OPCAO QUE DESEJAR REALIZAR\n1-transcricao\n2-saber qual aminoacido correspondente\n");
- scanf("%d", &nropcao);
- while ((nropcao !=1)&&(nropcao != 2)){
- printf("o sr. digitou errado, porfavor: 1 ou 2\n");
- scanf("%d", &nropcao);
- }
- if (nropcao==1){
- printf("Escreva sua trinca de ate 10 codons\n");
- scanf("%s", &trinca);
- while (trinca[i]!='\0'){
- if ((trinca[i]=='a')||(trinca[i]=='A')){
- trans[i]='u';
- }
- if ((trinca[i]=='t')||(trinca[i]=='T')){
- trans[i]='a';
- }
- if ((trinca[i]=='g')||(trinca[i]=='G')){
- trans[i]='c';
- }
- if ((trinca[i]=='c')||(trinca[i]=='C')){
- trans[i]='g';
- }
- if ((trinca[i]!='a')&&(trinca[i]!='A')&&(trinca[i]!='t')&&(trinca[i]!='T')&&(trinca[i]!='g')&&(trinca[i]!='G')&&(trinca[i]!='c')&&(trinca[i]!='C')){
- trans[i]='?';
- }
- i++;
- }
- trans[i]='\0';
- printf("\n antiga:\n %s", trinca);
- printf("\n nova:\n %s", trans);
- }
- if (nropcao==2){
- printf("digite as tres letras do codon em maiusculo\n");
- scanf("%s", &ABC);
- if ((ABC=='UUU')||(ABC=='UUC')){
- printf("Fenialanina (Fen)");
- }
- if ((ABC=='UUA')||(ABC=='UUG')||(ABC=='CUU')||(ABC=='CUC')||(ABC=='CUA')||(ABC=='CUG')){
- printf("Leucina (Leu)");
- }
- if ((ABC=='AUU')||(ABC=='AUC')||(ABC=='AUA')){
- printf("Isoleucina (Ile)");
- }
- if (ABC=='AUG') {
- printf("Metionina (Met) - Codon de inicio");
- }
- if ((ABC=='GUU')||(ABC=='GUC')||(ABC=='GUA')||(ABC=='GUG')){
- printf("Valina (Val)");
- }
- if ((ABC=='UCU')||(ABC=='UCC')||(ABC=='UCA')||(ABC=='UCG')||(ABC=='AGU')||(ABC=='ACG')){
- printf("Serina (Ser)");
- }
- if ((ABC=='CCU')||(ABC=='CCC')||(ABC=='CCA')||(ABC=='CCG')){
- printf("Prolina (Pro)");
- }
- if ((ABC=='ACU')||(ABC=='ACC')||(ABC=='ACA')||(ABC=='ACG')){
- printf("Treonina (Tre)");
- }
- if ((ABC=='GCU')||(ABC=='GCC')||(ABC=='GCA')||(ABC=='GCG')){
- printf("Alanina (Ala)");
- }
- if ((ABC=='UAU')||(ABC=='UAC')){
- printf("Tirosina (Tir)");
- }
- if ((ABC=='CAU')||(ABC=='CAC')){
- printf("Histidina (His)");
- }
- if ((ABC=='CAA')||(ABC=='CAG')){
- printf("Glutamina (Glu)");
- }
- if ((ABC=='AUU')||(ABC=='AAC')){
- printf("Asparagina (Asn)");
- }
- if ((ABC=='AAA')||(ABC=='AAG')){
- printf("Lisina (Lis)");
- }
- if ((ABC=='GAU')||(ABC=='GAC')){
- printf("Aspartato (Asp)");
- }
- if ((ABC=='GAA')||(ABC=='GAG')){
- printf("Glutamato (Glu)");
- }
- if ((ABC=='UGU')||(ABC=='UGC')){
- printf("Cisteina (Cis)");
- }
- if (ABC=='UGG'){
- printf("Triptofano (Trp)");
- }
- if ((ABC=='CGU')||(ABC=='CGC')||(ABC=='CGA')||(ABC=='CGG')||(ABC=='AGA')||(ABC=='AGG')){
- printf("Arginina (Arg)");
- }
- if ((ABC=='GGU')||(ABC=='GGC')||(ABC=='GGA')||(ABC=='GGG')){
- printf("Glicina (Gli)");
- }
- if ((ABC=='UAA')||(ABC=='UAG')||(ABC=='UGA')){
- printf("Codon de parada, nao ha aminoacido correspondente");
- }
- }
- getchar();
- getchar();
- return(0);
- }
- /*
- if(( A=='a')||( A=='t')||( A=='c')||( A=='g')||( B=='a')||( B=='c')||( B=='t')||( B=='g')||( C=='a')||( C=='t')||( C=='g')||( C=='c')){
- if((A=='a')&&(B=='c') &&(C=='g')){
- printf("essa eh a jesssiquina");
- }
- }
- else{
- printf("voce esta fazendo isso errado");
- }
- return(0);
- }
- */
Add Comment
Please, Sign In to add comment