keymasterviriya1150

Untitled

Sep 8th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include<cstdio>
  2. #include<iostream>
  3. #include<string>
  4. using namespace std;
  5. void testA()
  6. {
  7.     char c;
  8.     c=getchar();
  9.     putchar(c);
  10.     if(c=='?')
  11.         cout <<"fucking";
  12.        
  13. }
  14. void testB()
  15. {
  16.     char c;
  17.     while((c=getchar())!='\n')
  18.     {
  19.         putchar(c);
  20.     }
  21. }
  22. void testC()
  23. {
  24.     while(putchar(getchar())!='\n')
  25.     {
  26.         cout <<"FUCK\n";
  27.     }
  28. }
  29. void testD()
  30. {
  31.     int n;
  32.     char line[100];
  33.     n=0;
  34.     while(line[n++]=getchar()!='\n');
  35.     line[n]='\0';
  36.     printf("%d:\t%s",n,line );
  37. }
  38. void testE()
  39. {
  40.     string name;
  41.     cout << "Please, enter your full name: ";
  42.     getline (cin,name);
  43.     cout << "Hello, " << name << "!\n";
  44. }
  45. int main()
  46. {
  47.     testE();
  48. }
Add Comment
Please, Sign In to add comment