Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhugit authored Jun 15, 2024
1 parent bd252a6 commit e3ed3ee
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 0 deletions.
11 changes: 11 additions & 0 deletions couttest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>
int main()
{
using namespace std;
//×Ö·ûʹÓõ¥ÒýºÅ
char ch = 'M';
cout<<ch;
cin.get();
return 0;

}
4 changes: 4 additions & 0 deletions file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dsdad
sddsdga
3134@da
dsd
11 changes: 11 additions & 0 deletions prog1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>
int main()
{
using namespace std;
cout << "Come up and C++ me some time.";
cout << endl;
cout << "You won't regret it!" << endl;
cin.get();
return 0;

}
14 changes: 14 additions & 0 deletions prog2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
int main()
{
int carrots;

carrots=25;
std::cout<<"I have ";
std::cout<<carrots;
std::cout<<" carrots.";
std::cout<<std::endl;
carrots=carrots-1;
std::cout<<"Crunch,crunch.Now I have "<<carrots<<" carrots."<<std::endl;
return 0;
}
17 changes: 17 additions & 0 deletions prog3.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <iostream>
int main()
{
int carrots;

std::cout<<"How many carrots do you have?"<<std::endl;
std::cin>>carrots;
std::cout<<" Here are two more.";
carrots=carrots+2;

std::cout<<"Now you have "<<carrots<<" carrots."<<std::endl;

std::cin.get();

return 0;

}
19 changes: 19 additions & 0 deletions prog4.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
#include <cmath>

int main()
{
using namespace std;

double area;
double side;

cout<<"Enter the floor area,in square feet,of your home:";
cin>>area;
side=sqrt(area);
cout<<"That's the equivalent of a square "<<side
<<" feet to the side."<<endl;
cout<<"How fascinating!"<<endl;
cin.get();
return 0;
}
11 changes: 11 additions & 0 deletions zhuanyizifu.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <iostream>
using namespace std;
int main()
{
//'\a'·¢³öÉùÏì
char alarm='\a';
cout<<alarm<<"Don't do that again!\a\n";
cout<<"Ben \"Buggsie\" Hacker\nwas here!\n";
cin.get();
return 0;
}

0 comments on commit e3ed3ee

Please sign in to comment.