Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define MAX 100
- #include <string.h>
- void checksum(char str[]);
- int main()
- {
- char stringa[MAX];
- printf("Hello world!\n");
- checksum(gets(stringa));
- return 0;
- }
- void checksum(char str[]){
- int i=0;///indice stringa
- int j;///indice pacchetto
- int pack=strlen(str)/10;
- char mat[MAX][MAX];
- for(j=0;j<pack;j++){
- for(i=0;i<10;i++){
- mat[i][j]=str[i+10*j];
- }
- }
- for(j=0;j<pack;j++){
- printf("\nS%d",j);
- for(i=0;i<10;i++){
- printf("%c",mat[i][j]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement