先随机产生N个三位自然数输出,然后再输出其中同时是3、5、7倍数的数。(设N为100)

[复制链接]
查看11 | 回复1 | 2009-1-9 22:10:30 | 显示全部楼层 |阅读模式
帮忙啊

回复

使用道具 举报

千问 | 2009-1-9 22:10:30 | 显示全部楼层
#include#include #include int main( ) { int i,j=0,arr[100];srand((unsigned)time(NULL));for(i=0;iusing namespace std;void main(){ int i,a[100]; for(i=0;i<100;i++) {a=100+rand()%900;cout<<a<<' ';a } for(i=0;i<10...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行