here my script, please help me to resolve it :D thanks

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<float.h>

int main()
{
    /* KAMUS */
        /* volume gas ideal = V=nRT/P
            -R= 8.314

        P: tekanan (Pa/ N/m^2) = 8.5
        V: volume ruang (m^3)
        n: jumlah mol gas (kmol) = 1.5
        R: tetapan umum gas = 8.314 J/kmol
        T: suhu (Kelvin) = 296.75 */

    float mol,tknn;
    float suhu,ttpn;
    float vlm;
    /* Algoritma */

printf("masukkan jumlah mol (kmol):", mol);
    scanf("%f", &mol);
printf("masukkan besar suhu gas (kelvin):", suhu);
    scanf("%f", &suhu);
printf("masukkan tekanan gas (Pa/ N/m^2):", tknn);
    scanf("%f", &tknn);

    ttpn=8.314;


    vlm=mol*ttpn*suhu/tknn;

    printf("Jadi volume gas ideal adalah: \n", &vlm);

return 0;

}

Your printf format strings don't include any specifiers (like %s, %d, %f etc.). So printf does not expect any arguments after the format string, but you do give arguments. These arguments will be ignored and the compiler warns you about this because that's most probably not what you want.

You must use format specifiers at the places in the format string where you want your arguments to appear.

This article has been dead for over six months. Start a new discussion instead.