1.输入n个数 输出每个数的阶乘的末尾连续0的个数?如:输入:3 6 27 200输出:0 1 6 492.输入n个字符串,输出这些字符串的最长匹配子串;如:输入:abcdefgfgf a39dacn,cdefgeIo? a3 dcnn,wwcdefg.输出:cdefg
[此贴子已经被作者于2007-5-10 18:28:15编辑过]
我的算法#include <iostream.h>void main(){ int a,count; cout<<"please input a number:"<<endl; cin>>a; count=0; while(a/5) { count=count+a/5; a=a/5; } cout<<count<<endl;}
if(a==a[dong])出错error C2676: binary '==' : 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' does not define this operator or a conversion to a type acceptable to the predefin