C++有关问题在2点前(初学者有关问题)

C++问题在2点前在线等(菜鸟问题)
1.编写一个从键盘输出个整数,然后有反序输出的程序
2.求一个整形数组的最大以及最小值
3.建立个函数,求一个字符串长度
4.从字符串中删除指定字符,从字符串中删除指定字符如 "ABCDE ",删除C,变为 "ABDE "
5,编写一个程序,把整形数按照升序排序后输出  
大家看号题目,一题20分

------解决方案--------------------
2.

#include "stdafx.h "
#include <iostream>


using namespace std;


int main ()
{
const int size=50;
int ia[size];
for(int i=0;i <size;i++)
ia[i]=i;
int imax,imin;
imax=imin=ia[0];
for(int i=1;i <size;i++)
{
if(imax <ia[i])
imax=ia[i];
if(imin> ia[i])
imin=ia[i];
}
cout < <imax < < " " < <imin < <endl;

return 0;
}

------解决方案--------------------
#include "stdio.h "
#include "string.h "

void main(int agr,char *agv[])
{
int number=0; //得到一个整数。
int index=0; //得到整数长度
int temp1[21]; //64位整数长度
int temp2=0;
printf( "please input INT number: ");
scanf( "%d ",&number);
temp1[index]=number%10; //分解得到的整数。
temp2=number/10; //去除上面分解的整数。
index++;
while(temp2!=0) //当得到的整数大于1位时。
{
number=temp2;
temp1[index]=number%10;
temp2=number/10;
index++;
}
number=temp1[0];
for(int i=1;i <index;i++) //逆序输出。
{
number=number*10+temp1[i];
}
printf( "%d ",number);
return ;
}
------解决方案--------------------
1.

#include <iostream>
using namespace std;

char* Int2Str(int nIn, char* pszOut)
{
char *pStr = pszOut;

while (nIn)
{
*pStr++ = '0 ' + nIn % 10;
nIn /= 10;
}

_strrev(pszOut);
return pszOut;
}

int main(int argc, char* argv[])
{
int nIn = 0;
cout < < "Input a integer to convert: " < < endl;
cin > > nIn;

char A[1024] = {0, };
cout < < Int2Str(nIn, A) < < endl;

return getchar();
}
------解决方案--------------------
#include "stdio.h "
#include "string.h "
unsigned int strlen_v(char *ch)
{
unsigned int i=0;
while(ch[i]!=0)
{
i++;
}
return i;
}
void main(int agr,char *agv[])
{
char ch[255] ,cha;
printf( "please input char string: ");
scanf( "%s ",ch);
getchar();
printf( "the stringlen:%u\r\n ",strlen_v(ch));
printf( "please input del char*: ");
scanf( "%c ",&cha);
int index=0;
for(unsigned int i=0;i <strlen_v(ch);i++) //查找第一相同字符。
{
if(ch[i]==cha)index=i,i=strlen_v(ch);
}
for(unsigned int i=index;i <strlen_v(ch)-1;i++)//删除相同字符
{
ch[i]=ch[i+1];
ch[i+1]=0; //设置结束符NULL=0;
}

printf( "%s ",ch);
return ;
}
------解决方案--------------------
1. 如果是只要反序的话:

int _tmain(int argc, _TCHAR* argv[])
{
int nInteger;
char str[11] = { '\0 '};
scanf( "%d ", &nInteger);