哈工大c语言练习题.docxVIP

  • 24
  • 0
  • 约8.62千字
  • 约 8页
  • 2019-09-27 发布于广东
  • 举报
求用户输入的两个数的商,程序运行时,以 如下格式输入数据: In put two integers:4 2/ 请改正程序中的错误,使它能得出止确的结 果。 #include stdio.h main() { int a, b, c; printf(ulnput two integers:0); scanf(“%d,%d”,a, b); c = a\b; printf(The quotient of a and b is :%d, c); } # include stdio.h int main () { int a.b.c; printf (Ulnput two integers:”); scanf (n%d %d”,a,b); c=a/b; printf (HThe quotient of a and b is :%d\n”,c); return 0; } 使用const常量定义圆周率pi=3.14159,编 程从键盘输入圆的半径「,计算并输出圆的 周长和而积。输出的数据保留两位小数点。 输入格式要求: 提示信息:Input r: 输出格式要求: printf WITHOUT width or precision specifications:\n circumference = %f, area = %f\n printf WITH width and precision s

文档评论(0)

1亿VIP精品文档

相关文档