码迷,mamicode.com
首页 >  
搜索关键字:argc    ( 2629个结果
一些数学函数
fmod#include #includeint main(int argc, char *argv[]){ float a,b,c; while (scanf("%f %f",&a,&b)) { c=fmod(a,b); printf("%f\n",c...
分类:其他好文   时间:2014-08-02 17:52:13    阅读次数:243
c语言 C++ 读一字符串
标准c语言#include //---------回车被第一个 gets(s) 接收char s[100]; // -----直接换行,,,,,少一行int main(int argc, char ...
分类:编程语言   时间:2014-08-02 01:37:52    阅读次数:259
zju 1763
#include #include using namespace std;int main(int argc, char *argv[]){ double a,b; cin>>a; while (cin>>b) { if (b==999) { ...
分类:其他好文   时间:2014-08-02 01:27:12    阅读次数:297
zju 2886
#include #include using namespace std;int main(int argc, char *argv[]){ int i,n,m; string s; while(cin>>m) { while(m--) { cin>>s; n=1; if(s.si...
分类:其他好文   时间:2014-08-01 22:59:32    阅读次数:352
zju 2478
-#include using namespace std;int main(int argc, char *argv[]){ int n,i,sum; string s; cin>>n; while(n--) { cin>>s; for(i=0,sum=1;s[i];i++) { if(...
分类:其他好文   时间:2014-08-01 22:51:42    阅读次数:214
zju 1383 Binary Numbers
#include using namespace std;int a[1000];int f(int n){ int k=0; while(n) { a[k++]=n%2; n/=2; } return k;}int main(int argc, char *argv[]){ int n,m,...
分类:其他好文   时间:2014-08-01 22:45:22    阅读次数:248
工厂模式
通过大话设计模式一书学习后,c++编写的设计模式代码: // OOTest.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "Operation.h" #include "OperationFactory.h" int _tmain(int argc, _TCHAR* argv[]) { double resurt=0; Op...
分类:其他好文   时间:2014-08-01 19:55:32    阅读次数:221
C++ Primer 笔记 第一章
C++ Primer 学习笔记第一章 快速入门1.1 main函数 系统通过调用main函数来执行程序,并通过main函数的返回值确定程序是否成功执行完毕。通常返回0值表明程序成功执行完毕; main函数返回值必须是int类型。 参数: main(int argc, char *argv[]) .....
分类:编程语言   时间:2014-08-01 15:48:11    阅读次数:207
Object-C 学习笔记(一) Hello Objective-C
#import int main(int argc, const char *argv[]){ NSLog(@"Hello Object-C!"); return (0);}单击Build and GO或Mac键+R,将生成并运行程序;
分类:其他好文   时间:2014-08-01 15:35:41    阅读次数:176
Qt4.8.4 解决中文乱码的问题
最近用Qt + VS2008 来写点程序,但会有中文乱码现像,需要加上如下代码解决#include "myclass.h"#include #include int main(int argc, char *argv[]){ QApplication a(argc, argv); QTe...
分类:其他好文   时间:2014-08-01 10:44:21    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!