VladimirMagus
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <locale.h> #include <string.h> void readstr(char*); void main() { int i, nom; char *stro=new char[30]; setlocale(LC_CTYPE, "Russian"); i=1; while(i) { puts("1-enter\n2-print\nany-exit\n\n"); scanf_s("%d",&nom); switch(nom) { case 1: readstr(stro); break; case 2: printf("%s\n",stro); break; default: i=0; } } _getch(); } void readstr(char* st) { printf("Enter any string\n"); scanf_s(st); } -------------------------------------- Colored with http://dumpz.org |
|