first code
This commit is contained in:
parent
79f83aa190
commit
0bb57da7ec
@ -1,11 +1,15 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main() {
|
int main()
|
||||||
unsigned int a; // Change 'int' to 'unsigned int'
|
{
|
||||||
|
|
||||||
printf("Enter your number: ");
|
int a, b;
|
||||||
scanf("%x", &a); // Now 'a' matches '%x' expected type
|
|
||||||
printf("a = %u\n", a); // Use '%u' to correctly print an unsigned int
|
|
||||||
|
|
||||||
return 0;
|
printf("Enter a number : ");
|
||||||
|
|
||||||
|
scanf("%x", &a);
|
||||||
|
|
||||||
|
printf("a = %d\n", a);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user