Students Registration
Posted by Samath
Last Updated: February 27, 2012
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>

int main(int argc, char *argv[])
{
char name[35];
char studentID[35];
char address[35];
char dobk[35];
char* RandNum;
 
char UserLetter;


printf("Please Enter your full name: ");
fflush(stdin);
scanf("%s",&name);
printf("Please Enter your Student ID Number: ");
fflush(stdin);
scanf("%s",&studentID);
printf("Please Enter your Address: ");
fflush(stdin);
scanf("%s",&address);
printf("Please Enter your DOB: ");
fflush(stdin);
scanf("%s",&dobk);


 srand ((unsigned) time(0));
 
for (int i=0; i <10;i++)
{
RandNum[i]= 65 + rand()% 26;
}
 
printf("Your password is %s",RandNum);
return 0;
}
Related Content