本文介绍了我对"{"有误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include<stdio.h>
void main()
{
int length, weight, c;
printf("\n Plz input length: ");
printf("\n Plz input weighth: ");
scanf("%d", &length);
scanf("%d", &weight);
c = (length + weight)/ 2;
prinf("\n perimeter: %d", c);
}
对C来说,新手Sry im是昨天昨天在学校里上的课,所以在这里我可以问一下我在上面的代码中错了什么吗?我一直对Scanf说错误,所以我改用了2个XD而不是1个scanf!也是priftf ...〜.〜希望有人帮助:(
Sry im new to C just got the lession in school the yes-yesterday so here can i ask what did i wrong in the code above it keep saying error to Scanf so instead of 1 scanf i switch to 2 XD! and priftf too... ~.~ Hope to have someone help :(
推荐答案
#include <stdio.h>
int main()
{
int length, width, perim;
printf("Plz input length: ");
scanf("%d", &length);
printf("\n Plz input width: ");
scanf("%d", &width);
perim = (length + width) * 2;
printf("\n perimeter: %d", perim);
return 0;
}
这篇关于我对"{"有误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!