微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

读取一定量的水,以夸脱为单位,并显示该数量的水分子数

单分子水的质量约为3.0×10克。一夸脱水约950克。

#include <stdio.h>  

int main(void)  
{  
    float mass_mol = 3.0e-23;    /* mass of water molecule in grams */  
    float mass_qt = 950;        /* mass of quart of water in grams */  
    float quarts;  
    float molecules;  

    printf(Enter the number of quarts of water: );  
    scanf(%f, &quarts);  
    molecules = quarts * mass_qt / mass_mol;  
    printf(%f quarts of water contain %e molecules.\n, quarts, molecules);  
    return 0;  
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐