1.
//************************************
//** ch1_2.cpp **
//************************************
#include<iostream>
using namespace std;
int main()
{
int a,b,result;
cout<<"please input two numbers:\n";
cin>> a >> b;
result=3*a-2*b+1;
cout<<"result is"<< result <<endl; // cout<<"result is"<< result <<'\n';
system("pause");
}
2.//************************************
//** ch1_3.cpp **
//************************************
#include <iostream>
using namespace std;
int main()
{
int a;
cout <<"please input a number:\n";
cin >>a;
int c1 = a%3==0; //这里==0的作用是什么呀?
int c2 = a%5==0; /* 如果重新写一下你就明白了 */
int c3 = a%7==0; /* int c3; c3=((a%7)==0); */
/* 这几行的作用是给这个数 */
/* 是否能被3,5,7整除设个标志位 */