首页 > > 详细

调试C 、C语言讲解留学生、辅导留学生C、C语言讲解

#include
#include
#include // list class-template definition
using namespace std;
int main()
{
list int_list;
list char_list;
list bool_list;
int x = 0;
for (int i = 75; i >= 65; --i)
{
int_list.push_back(i);
char_list.push_back(static_cast (i + x));
if (i <= 70)
x += 2;
} // end for
bool_list.push_back(true);
bool_list.push_back(false);
bool_list.push_back(false);
bool_list.push_back(true);
printlist(int_list);
cout << (palindrome(int_list) ? " is " : " is not ") << "a palindrome\n";
printlist(char_list);
cout << (palindrome(char_list) ? " is " : " is not ") << "a palindrome\n";

printlist(bool_list);
cout << (palindrome(bool_list) ? " is " : " is not ") << "a palindrome\n";
system("PAUSE");
return 0;
} // end main
 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!