Kodewick
Start learning →
Starter←→0 / 70

Battery percent

#008StarterOutput2 min

The phone shows its battery in the corner. Use printf to show Battery: 80%, the 80 coming from battery. % means something special to printf; to show the sign itself, write it twice: %%.

Should show
Battery: 80%
main.c
#include <stdio.h>

int main(void) {
    int battery = 80;
    // your code here: printf Battery:, the level and a % sign
    return 0;
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.