View Code of Problem 3869

#include <bits/stdc++.h>

int main() {
    double n;
    while(scanf(“%lf”, &n)!=EOF) {
        printf(“%.0lf\n”, pow(2, n));
    }
}
/*
Main.cc:5:5: error: stray '\342' in program
     while(scanf(“%lf”, &n)!=EOF) {
     ^
Main.cc:5:5: error: stray '\200' in program
Main.cc:5:5: error: stray '\234' in program
Main.cc:5:5: error: stray '\342' in program
Main.cc:5:5: error: stray '\200' in program
Main.cc:5:5: error: stray '\235' in program
Main.cc:6:9: error: stray '\342' in program
         printf(“%.0lf\n”, pow(2, n));
         ^
Main.cc:6:9: error: stray '\200' in program
Main.cc:6:9: error: stray '\234' in program
Main.cc:6:9: error: stray '\' in program
Main.cc:6:9: error: stray '\342' in program
Main.cc:6:9: error: stray '\200' in program
Main.cc:6:9: error: stray '\235' in program
Main.cc: In function 'int main()':
Main.cc:5:20: error: expected primary-expression before '%' token
     while(scanf(“%lf”, &n)!=EOF) {
                    ^
Main.cc:5:21: error: 'lf' was not declared in this scope
     while(scanf(“%lf”, &n)!=EOF) {
                     ^
Main.cc:6:19: error: expected primary-expression before '%' token
         printf(“%.0lf\n”, pow(2, n));
                   ^
Main.cc:6:20: error: unable to find numeric literal operator 'operator""lf'
         printf(“%.0lf\n”, pow(2, n));
                    ^
Main.cc:6:20: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
*/

Double click to view unformatted code.


Back to problem 3869