|
I am sorry I was unaware. I thought that I was not suppose to print the whole code. Below I have added what I have already written. I kind of combined two different codes hoping it will work but as I stated the trouble comes with creating a strcpy.
#include <stdio.h> #include <iostream> #include <string.h>
void shift (char *p1, char *p2, char *p3, char *p4, char*p5);
int main (int argc, char argv[]) {
char temp; char p1 = 'A', p2 = 'B', p3 = 'C', p4 = 'D', p5 = 'E';
strcpy(temp, shift); int move = 0; int tmp = 0; printf("Letters before they are shifted: "); printf("ABCDE"); scanf("%c, &letter");
printf("\n\nHow many places would you like the letters shifted?"); scanf("%c, move"); if (move != 0) { printf("Letters after they are shifted: "); for(tmp = 0; tmp<5; tmp++) printf("\n"); } return 0; } void letters(char *buffer, int places) { places = places%5; for(int i = 0; i<5; i++) { buffer [i] = buffer[i] - places; if (buffer[i]<6) { buffer[i] = buffer[i]+5; } } }
Can you also tell me if Visoal studio has the ability to add the source codes?
Thank you.
|