0% found this document useful (0 votes)
4 views2 pages

LTC

The document contains C code snippets that demonstrate basic input/output operations, variable declaration and initialization, arithmetic operations, and for loops.

Uploaded by

minh102264
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

LTC

The document contains C code snippets that demonstrate basic input/output operations, variable declaration and initialization, arithmetic operations, and for loops.

Uploaded by

minh102264
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include <stdio.

h>
#include <limits.h>
#include <float.h>
int main() {
printf("char:%d~%d\n", CHAR_MIN, CHAR_MAX);
printf("unsigned char:0~%u\n", UCHAR_MAX);
printf("int:%d~%d\n", INT_MIN, INT_MAX);
printf("unsigned int:0~%u\n", UINT_MAX);
printf("long:%ld~%ld\n", LONG_MIN, LONG_MAX);
printf("unsigned long:0~%lu\n", ULONG_MAX);
printf("float:%E~%E\n", FLT_MIN, FLT_MAX);
printf("double:%lE~%lE", DBL_MIN, DBL_MAX);
}
#include <stdio.h>
int main() {
char c;
scanf("%c",&c);
printf("%d",c);
#include <stdio.h>

int main() {
double X, Y;
scanf("%lf %lf", &X, &Y);

double Z = X + Y;
printf("Tong cua %.2lf + %.2lf = %.2lf\n", X, Y, Z);

return 0;
}
#include <stdio.h>
#include <math.h>
int main() {
int a, b;
scanf("%d %d", &a,&b);
for(int i = a; i <= b; i++)
{
for(int j = 1; j <= 9;j++)
if(j >= i)
printf("%dx%d=%d\n", i, j, i*j);
}
}

You might also like