#include<stdio.h> int main(){ int a,b; printf("Nhap vao a:"); scanf ("%d",&a);…
Jump to turn (8)
- 1#include int main(){ int a,b; printf("Nhap vao a:"); scanf ("%d",&a); printf("\n
- 2tại sao chưa nhập được b ở console
- 3các nút thao tác trên bàn phím trong C
- 4getchar là hàm gì ?
- 5scanf và scanfs khác nhau những gì ?
- 6các phím thao tác nhanh trong dev C
- 7#include int main(){ int so; printf("Nhap mot so tu ban phim: "); scanf("%d",&so
- 8#include int main(){ int so; printf("Nhap mot so tu ban phim: "); scanf("%d",&so
- User
#include<stdio.h>
int main(){ int a,b; printf("Nhap vao a:"); scanf ("%d",&a);
codeprintf("\nNhap vao b: "); scanf(":%d",&b); printf ("a=%d\nb=%d",a,b); return 0;}
- Assistant
The code you provided is written in C programming language and it prompts the user to enter the values for variables a and b, and then prints the values of a and b. However, there is a typo in the scanf statement for variable b, where you added an unnecessary colon (:) before "%d". Here's the corrected code:
c#include <stdio.h> int main() { int a, b; printf("Nhap vao a: "); scanf("%d", &a); printf("\nNhap vao b: "); scanf("%d", &b); printf("a = %d\nb = %d", a, b); return 0; }