上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 6.1#include //注意输入是ksngksjg234KJSG@skng这种情况void main61(){ using namespace std; cout='A'&&ch='a'&&ch<='z') cout<<char(ch-32); else cout<<ch; ch=arr[i]; } cout<<"\nOVER"; cin.get(); cin.get();} 阅读全文
posted @ 2014-03-28 09:37 天下纵横C++ 阅读(179) 评论(0) 推荐(0)
摘要: 5.6#include #include void main56(){ using std::cout; using std::cin; using std::string; string m[12]={"1","2","3","4","5","6","7","8","9","10","11","12"}; const string *s=m; int ar 阅读全文
posted @ 2014-03-27 16:11 天下纵横C++ 阅读(225) 评论(0) 推荐(0)
摘要: 5.1#include #includeusing namespace std;void main51(){ int min,max; cout>min; cout>max; int sum=0; for(int i=min;i arr;}5.2#include #include using namespace std;const int ArrSize=101;void main52(){ array arr; arr[0]=arr[1]=1L; for(int i=2;ivoid main53(){ using namespace std; cout>iput; whil 阅读全文
posted @ 2014-03-27 16:06 天下纵横C++ 阅读(192) 评论(0) 推荐(0)
摘要: 4.6#include #include using namespace std;struct CandyBar{ string name; double weight; int kaluli;};void show(CandyBar &c);//按值传递和引用传递均可void main46(){ CandyBar cb[3]={{"one",1.8,10},{"two",2.9,30},{"three",5.0,60}}; for(int i=0;i#include using namespace std;struct Pi 阅读全文
posted @ 2014-03-27 16:02 天下纵横C++ 阅读(224) 评论(0) 推荐(0)
摘要: 4.1#include void main41(){ using namespace std; cout>grade; cout>age; cout#include using namespace std;void main42(){ string name; cout>name;//一定要包含string头文件,否则会出错 getline(cin,name); coutusing namespace std;void main43(){ const int ArrSize=20; char name[ArrSize]; char xing[ArrSize/2]; cout# 阅读全文
posted @ 2014-03-27 16:00 天下纵横C++ 阅读(122) 评论(0) 推荐(0)
摘要: 3.1//3.1#include const char c=10;int main31(){ using namespace std; cout>l; cout#include const int CToC=12; //1英尺=12英寸 const double KToB=2.2;//1KG=2.2磅 const float CToM=0.0254;//1英尺=0.0254m int main(){ cout>yc; cout>yci; cout>w; int l=yc*CToC+yci; float li=l*CToM; double wi=w*KToB;... 阅读全文
posted @ 2014-03-27 15:42 天下纵横C++ 阅读(205) 评论(0) 推荐(0)
摘要: 2.6#include double change(double y);int main(){ cout>n; coutvoid see(int h,int m);int main(){ cout>h; // cout>m; //cout<<m<<endl; see(h,m); cin.get(); cin.get(); cin.get(); cin.get(); return 0; }void see(int h,int m){ cout<<"Time"<<h<<":"< 阅读全文
posted @ 2014-03-27 15:35 天下纵横C++ 阅读(186) 评论(0) 推荐(0)
摘要: 第一章没有习题2.1//p35 1#include int main(){ coutint main(){ cout>n; //coutvoid myFuction1();void myFuction2() ;int main(){ using namespace std; myFuction1(); myFuction1(); myFuction2(); myFuction2(); cin.get(); return 0; }void myFuction1(){ coutint main(){ cout>age; ... 阅读全文
posted @ 2014-03-27 15:33 天下纵横C++ 阅读(157) 评论(0) 推荐(0)
摘要: 断断续续弄了差不多两个星期,终于把这个弄好了,在我的电脑上以及朋友的xp系统上测试成功!下面不多说,直接上代码。说明:电脑必须装好jmf,并且用JMStudio能正常打开摄像头,否则运行不了,具体是什么原因我也不太清楚。//已成功实现功能,获取当前摄像头并且拍照。//照片存在E:\photo目录下import java.awt.Component;import java.awt.FlowLayout;import java.awt.Image;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;impor 阅读全文
posted @ 2013-12-16 20:15 天下纵横C++ 阅读(187) 评论(0) 推荐(0)
摘要: 这是因为的硬盘是NTFS所致的,解决方法很简单。右键chm文件,打开属性,在常规那里,解除锁定即可,如图所示。 阅读全文
posted @ 2013-12-16 14:17 天下纵横C++ 阅读(127) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 下一页