Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<stdlib.h>
- int main(){
- char Meh[10],aux[2],aux2[8],gg[20];
- int numero,i;
- printf("ingresre una cadena");
- gets(Meh);
- strcpy(aux2,Meh);
- if(Meh[8]=='P'){
- strcpy( aux, Meh );
- numero = atoi(aux)+12;
- }
- itoa(numero,aux,10);
- for(i=0;i<10;i++){
- if(i<6){
- aux2[i]=aux2[i+2];
- else{
- aux2[i]=''; //no se que onda aca
- }
- }
- }
- strcpy( gg,aux);
- strcat(gg,aux2);
- printf("%s",gg);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement