#include <stdio.h> #include <conio.h> #include <ctype.h> #include <iostream.h>
int main(int argc, char *argv[]) { int i,j,k; char ch; do { cout<<'\n'; cout<<"Wpisz dowolny znak z klawiatury "; ch = getchar(); cout<<'\n'; cout<<"Wpisales znak "; cout<<ch; getchar(); } while (ch!='.'); return 0; } |
#include <stdio.h> #include <conio.h> #include <ctype.h> #include <iostream.h>
int main(int argc, char *argv[]) { int i,j,k; char ch; do { cout<<'\n'; cout<<"Wpisz dowolny znak z klawiatury "; ch = getchar(); cout<<'\n'; i=ch; cout<<"Kod tego znaku w tablicy ASCII wynosi "; cout<<i; getchar(); } while (ch!='.'); return 0; }
|
#include <stdio.h> #include <conio.h> #include <ctype.h> #include <iostream.h>
int main(int argc, char *argv[]) { int i,j,k; char ch; do { ch = getche(); cout<<'\n'; if (islower (ch)) putchar(toupper(ch)); else putchar(toupper(ch)); cout<<'\n'; } while (ch!='.'); return 0; } |
#include <stdio.h> #include <conio.h> #include <ctype.h> #include <iostream.h>
int main(int argc, char *argv[]) { int i,j,k; char ch; do { cout<<'\n'; cout<<"Wpisz dowolny znak z klawiatury "; ch = getchar(); cout<<'\n'; cout<<"Nastepnym znakiem w tablicy ASCII jest "; putchar(ch+1); getchar(); } while (ch!='.'); return 0; }
|