Why it isn't working?

0 votes
asked Mar 4, 2018 by anonymous
#include <stdio.h>

int main(){

    double n1, n2 = 0;
    scanf("lf lf", &n1, &n2);
    printf("%f %f %f %f", n1+n2, n1-n2, n1*n2, n1/n2);
    return 0;


1 Answer

0 votes
answered Mar 6, 2018 by anonymous
You forgot your "%" in front of your lf in your scan statement.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.