COMPUTER SCIENCE C++

1.f) In the following program, if the value of N given by the user is 20, what maximum and minimum values the program could possibly display?

#include <iostream.h>
#include <stdlib.h>
void main()
{ int N,Guessnum;
randomize();
cin>>N;
Guessnum=random(N-10)+10;
cout<<Guessnum<<endl;
}

2

Answer:Maximum Value:19 Minimum , Value:10

(1 Mark for writing correct minimum value)(1 Mark for writing correct maximum value)

Header filesImportant Functions.

From Old Papers
Name the header files that shall be needed forthe following:

2009 Outside Delhi:

(i) setw( ) – iomanip.h
(ii) sqrt( ) – math.h

2008 Delhi & OD:

Due to cout, include iostream.h
Due to setw( ), include iomanip.h

2007 Delhi & OD:

Due to strcat( ), include string.h
Due to gets( ), include stdio.h

2006 Delhi:

(i) abs( ) - math.h, stdlib.h
(ii) isupper( ) – ctype.h

2006 Outside Delhi

(i) abs( ) - math.h, stdlib.h
(ii) random( ) - stdlib.h

2005 Delhi:

(i) abs( ) - stdlib.h, math.h
(ii) strcmp( ) - string.h

2005 OD:

(i) puts( ) - stdio.h
(ii) isalnum( ) - ctype.h

2004 :

(i) gets( ) - stdio.h
(ii) strcmp( ) - string.h
(iii) abs( ) - math.h, stdlib.h
(iv) isalnum( ) - ctype.h

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com )


Warning: include_once(../../ebooks-footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/cpp25.php on line 135

Warning: include_once(): Failed opening '../../ebooks-footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/cpp25.php on line 135

Warning: include_once(../../../footer19.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/coumputer-science/cpp25.php on line 137

Warning: include_once(): Failed opening '../../../footer19.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/coumputer-science/cpp25.php on line 137