Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main()
- {
- int scanfunc;
- int x;
- printf( "What kind of Subnetting do you wish to do?\n1.)binary conversions\n2.)subnetting\n" );
- scanf( "%d", &scanfunc );
- if ( scanfunc ==1 ) {
- do {
- srand(time(NULL));
- int rc;
- rc = (rand() % (255 + 1) + 1);
- printf( "Your number is: %d", rc );
- printf( "\nto create a new number press 1 and enter. To exit press 2 then enter\n" );
- scanf( "%d", &x );
- } while ( x == 1 );
- }
- else if ( scanfunc == 2 ) {
- printf( "function not created yet 2" );
- }
- else {
- printf( "You did not type a 1 or a 2" );
- }
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement