Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ***************MCQs answers
- void
- int
- 19
- Compilation error
- *********************Farenheit to Celcius
- void printTable(int start, int end, int step) {
- /* Don't write main().
- * Don't read input, it is passed as function argument.
- * Print output and don't return it.
- * Taking input is handled automatically.
- */
- for(int i=start;i<=end;i+=step)
- cout<<i<<'\t'<<((i-32)*5)/9<<'\n';
- }
- ****************Fibonacci
- bool checkMember(int n){
- /* Don't write main().
- * Don't read input, it is passed as function argument.
- * Return output and don't print it.
- * Taking input and printing output is handled automatically.
- */
- int a=0,b=1,i,temp;
- if(n==0)
- return 1;
- else if(n==1)
- return 1;
- else
- {
- for(i=1;i<=10000;i++)
- {
- temp=b;
- b=b+a;
- a=temp;
- if(b==n)
- return 1;
- }
- }
- return 0;
- }
- *********MCQs Answers
- Yes
- No
- 8
- 5
- 16
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement