????? ?????????????, ???????????? ????? CyberForum.ru
???? ????????

?????? ? ???????? - C++

?????
???????????
???????????? ??????
?????? ???? ???????
C++ ??????? ? ??????? ?? ?++ http://www.cyberforum.ru/cpp-beginners/thread1180821.html
Var t:integer; Begin write('??????? ???????????? ?????????? ??????? ? ????????: '); readln(t); writeln('?????: ',t div 3600,' ?????: ',t div 60 mod 60,' ??????: ',t mod 60); ...
C++ ???? ??? ??????? ?????? ? ??? ??????? ??????? ????????????. ?, ?????? ????? ? ?++ ???? ??? ??????? ?????? ? ??? ??????? ??????? ????????????. ??? ???????????? ????????????, ?.?. ????? ?????? ??????? http://www.cyberforum.ru/cpp-beginners/thread1180799.html
??????? Compress(s,t) C++
??????????: ?????? ? ?????? s ????????????? ????????? ??????? t ?? ????.
???????? ??????? ??????? ? ????? ????? ????? C++
???? ?????????????? ????? R ???? nnn. ddd (??? ???????? ??????? ? ??????? ? ????? ??????). ???????? ??????? ??????? ? ????? ????? ????? ? ??????? ?????????? ???????? ?????.
C++ ?????????????? ???????? http://www.cyberforum.ru/cpp-beginners/thread1180792.html
???? ????? "??????? ??????????". ???? ??? ?????????: ????? ? ????????. ??? ????????? ???????? ?? ??????????????? ?.?. ???? ???????? ????? ?????-?? ????? (??? ?????????), ??? ???????? ?????????? ??...
C++ ?????? ????????? ??? ???????? ? ?????????? signed int f = -0x80000000; signed int t = -1; signed int k = (f / t); ?????????

???????? ????????? ????????
1152
0 / 0 / 0
???????????: 18.05.2014
?????????: 6
19.05.2014, 16:18  [??]
1. ??????? ????????? ???????????? ????:
C++
1
2
3
4
5
6
7
8
//golf.h
const int Len=40;
struck golf
{
char fullname[Len];
int handicap;
};
void setgolf(golf&g,const char*name,int he);
//??????????????? ??????: ??????? ???????????
//?????????. ???? golf ??? ?????? ? ??? ???????? (????), ????????? ???????????? ?? ?????????
C++
1
int setgolf(golf&g);
//????????????? ??????: ??????? ?????????? ???????????? ?????? ??? ?
//????????, ??????????? ????????? ????????? g ????????? ????????; ?????????? 1, ???? ???????
//???, ? 0, ???? ??????? ?????? ??????
C++
1
void handicap(golf&g, int he);
//??????? ????????????? ????? ???????? ?????????
C++
1
void showgolf(const golf&g);
//??????? ?????????? ?????????? ????????? ???? golf
???????? ????????, ??? ??????? setgolf() ???????????. ????? ?????? ?????? ??????? ????? ????????? ???:
C++
1
2
golf ann;
setgolf(ann, "Ann Birdfree",24);
??????? ???????????? ??????????, ??????? ?????????? ? ???????? ann. ????? ?????? ?????? ??????? ????? ????????? ???:
C++
1
2
golf andy;
setgolf(andy);
??????? ?????????? ???????????? ?????? ??? ? ????????, ? ????? ????????? ??? ?????? ? ????????? andy.
????????? ????????????? ????????? ?? ?????? ????? ????????????? ?????. ???? ???? ?? ????? golf.cpp ?????? ????????? ??????????? ???????, ??????? ????????????? ?????????? ????????????? ?????. ?????? ???? ?????? ????????? ??????? main() ? ???????????? ?????????? ???? ??????? ????????????????? ???????. ????????, ???? ?????? ??????????? ???? ??????? ???????? ???? golf ? ?????????? ???? ????? ?????????? ???????, ???? ????? ?????? ????? ?????? ? ????? ???????????? ?????? ?????? ??????. ????? ???????? ?????? ? ?????????? ???? golf, ??????? main() ?????? ???????????? ?????? ?????????????????? ???????.

2. ?????????? ????????? ??? ????? ???????, ????? ? ??? ?? ?????????????? ?? ??????????, ?? ????????? using.
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;
int main()
{
double x;
cout<<"Enter value:";
while(!(cin>>x))
{
cout<<"Bad input. Please enter a number:"; //???????? ????
cin.clear();
while (cin.get()!='\n')
continue;
}
cout<<"Value="<<x<<endl;
return 0;
}
0
 
?????????? - ????? ?????????????, ???????????? ?????, ????????????????
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
???????@Mail.ru