Login
...or Sign up
Home
Search
Search Code Snippets
Search People
Search
Code Snippets
People
13 Code Snippets found matching c++
#include <iostream> using namespace std; int main(){ cout << "Hello world!" << endl; return 0; }
C++ hello world
Uploaded on
4/29/2007 12:00:00 AM
Programming Language:
c++
By:
ferdo
See more code snippets of
ferdo
c++
hello world
CButton myButton; // Create an auto 3-state button. myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE, CRect(10,10,100,30), pParentWnd, 1); // Set the check state to the next state // (i.e. BST_UNCHECKED changes to BST_CHECKED // BST_CHECKED changes to BST_INDETERMINATE // BST_INDETERMINATE changes to BST_UNCHECKED). myButton.SetCheck( ((myButton.GetCheck()+ 1 ) % 3) ); //Additional code here if( myButton.GetCheck() == BST_UNCHECKED ) { //... } else if( myButton.GetCheck() == BST_CHECKED ) { //... }
Changing the state of a 3-state check button on Visual C++
Uploaded on
5/5/2007 12:00:00 AM
Programming Language:
Visual C++
By:
antoniohs
See more code snippets of
antoniohs
3-state
change state
check
checkbutton
state
/* ID:31440461 PROG:ride LANG:C++ */ #include<fstream> using namespace std; ifstream fin("ride.in"); ofstream fout("ride.out"); int main() { int a[2]={1,1}; char s[7]; for (int i=0;i<=1;i++) { fin>>s; for (int j=0;s[j]!='\0';j++) a[i]*=s[j]-'@'; } if ((a[0]-a[1])%47) fout<<"STAY"<<endl; else fout<<"GO"<<endl; return 0; }
usaco_1.1.1.cpp
Uploaded on
7/7/2009 9:54:39 AM
Programming Language:
C++
By:
314406cjc
See more code snippets of
314406cjc
/* ID:31440461 PROG:gift1 LANG:C++ */ #include<fstream> #include<iostream> #include<string> using namespace std; struct people { string name; int money; } p[10]; int main() { ifstream fin("gift1.in"); ofstream fout("gift1.out"); int np; fin>>np; for (int i=0;i<np;i++) fin>>p[i].name; for (int i=0;i<np;i++) { string name; int money,j,num; fin>>name>>money>>num; for (j=0;j<np;j++) if (p[j].name==name) break; if (num!=0) p[j].money+=money % num; p[j].money-=money; for (j=0;j<num;j++) { fin>>name; for(int z=0;z<np;z++) if (p[z].name==name) { p[z].money+=money/num; break; } } } for (int i=0;i<np;i++) fout<<p[i].name<<" "<<p[i].money<<endl; return 0; }
usaco_1.1.2.cpp
Uploaded on
7/7/2009 9:57:58 AM
Programming Language:
C++
By:
314406cjc
See more code snippets of
314406cjc
/* ID : 31440461 PROG : friday LANG : C++ */ #include <iostream> #include <fstream> const int a[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int mark[7]; using namespace std; int n, now, month; int main(void) { ifstream fin ("friday.in"); ofstream fout ("friday.out"); now = 13; mark[6]++; fin >> n; for (int i = 1; i <= n; i++) for (int j = 0; j < 12; j++) { now += a[j]; if ( ( (1899 + i) % 400 == 0 || ( (1899 + i) % 4 == 0 && (1899 + i) % 100 != 0 ) ) && j == 1) now++; now %= 7; if (i != n || j != 11) mark[now]++; } fout << mark[6] << " "; for (int i = 0; i < 5; i ++) fout << mark[i] << " "; fout << mark[5] << endl; }
usaco_1.1.3.cpp
Uploaded on
7/7/2009 9:58:40 AM
Programming Language:
By:
314406cjc
See more code snippets of
314406cjc
1
2
3
Help
Help by email
What is Naslu?
|
About Naslu
|
Contact
|
Terms of Use
|
Downloads
|
Webprogramacion.com
|
Blog
|
Top
Links
Select language:
Español
|
English
© 2009 naslu.com