Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Stringovi 8.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char s1[80];
- int i = 0, s = 0, j = 0, pom, duzina = 0;
- printf("Unesi string:");
- gets(s1);
- while (s1[i] != ' ')
- i++;
- s = i;
- duzina = strlen(s1);
- pom = s1[s];
- for (j = s; j<duzina; j++)
- s1[j] = s1[j + 1];
- s1[duzina - 1] = pom;
- puts(s1);
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement