Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int str_zamena(char *str);
- int main() {
- char *str = new char;
- cin.getline(str,1000);
- int (*ptr)(char *str);
- ptr=str_zamena;
- cout << ptr(str) << " " << str;
- return 0;
- }
- int str_zamena(char *str){
- int nom=0;
- int i=0;
- while(str[i]!='\0'){
- if(str[i]>96 && str[i]<123 ){
- str[i]=str[i]-32;
- nom++;
- }
- i++;
- }
- return nom;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement