RANDOM.CPP
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:1k
源码类别:
Windows编程
开发平台:
Visual C++
- //THE PROGRAM HELPS YOU TO GET THE RANDOM NUMBERS.
- //FILE RANDOM.CPP
- #include <stdlib.h>
- #include <stdio.h>
- #include <conio.h>
- #include <time.h>
- int main(void)
- {
- int INPUT,NUMBER,CIRCLE;
- printf("n*-*-*-*-* TO GETTING RANDOM NUMBERS' PROGRAM *-*-*-*-*n");
- printf("n***** MESSAGE : I WILL DISPLAY RANDOM NUMBERSn");
- printf(" BELOW YOUR INPUT INTEGER !!!n");
- printf("n----- NOW , PLEASE INPUT AN INTEGER : ");
- scanf("%d",&INPUT);
- printf("n-*-*-*-*-*- HOW MANY RANDOW NUMBERS YOU WANT : ");
- scanf("%d",&NUMBER);
- printf("n***** THE RANDOM NUMBERS ARE THE FOLLOWING *****nn");
- for (CIRCLE=0;CIRCLE<NUMBER;CIRCLE++)
- {
- printf("%d ",INPUT);
- }
- getch();
- return 0;
- }