#include <iostream> #include <fstream> #include <cstdlib> #include <string> using namespace std; struct patron { double mon; string name; }; int main() { int num,count1=0,count2=0; ifstream fin; char filename[20]; cout<<"…
#include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using namespace std; int main() { char filename[SIZE]; char ch; ifstream inFile;//inFile 是有一个ifstream对象 cout<<"Enter name of file: "; cin.get(fi…
#include <iostream> #include <string> #include <cctype> using namespace std; int main() { string words; int yy=0; int fy=0; int other=0; cout<<"Enter words (q to quit):\n"; while(cin>>words) { if(isalpha(words[0]))…
#include <iostream> #include <string> using namespace std; const int MSIZE=100; struct juankuan { string name; double mon; }; int main() { int num; (cin>>num).get(); int *c1=new int[num];//存储捐款超过10000的捐款个体 int count1=0;//记录捐款超过10000的个数 i…
#include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int N3=5000; int main() { double salary; double sui=0; cout<<"Enter the salary: "; while(cin>>salary && salary>=0) { if(salary…
#include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showmenu() { cout<<"Benevolent Order of Programmers Report\n" "a. display by name b. display by title\n" "c. display by bopname d…
#include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter one of the following choices:\n" "c) carnivore p) pianist\n" "t) tree g) game\n"; } void ak(void) { cout<<"Please enter…
#include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int main() { double dd[MAXSIZE]; double donation; double aver=0; int num=0; int i=0; while(i<MAXSIZE && cin>>donation && !isdigit(donatio…
#include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=cin.get())!='@') {  if(isdigit(ch))   continue;  else if(islower(ch))   ch-='z'-'Z';  else if(isupper(ch))   ch+='z'-'Z';  cout<<ch; } system("pa…
#include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of rows: "; (cin>>num).get(); for(int i=1;i<=num;i++) {  for(int j=num-i;j>0;j--)   cout<<".";  for(int k=1;k<=i;k++)   co…