Session 03 - Lab

Thứ Hai, 25 tháng 5, 2015 | Đăng: Son
Bài 1

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
int a,b;
printf("nhap va so can binh phuong:");
scanf("%d",&a);
b = a*a;
printf ("%d",b);
    return 0;
}


Bài 2

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
    float d,c,s;
    printf("nhap vao ban kinh duong tron: ");
    scanf("%f",&d);
    c = d*2*3.14;
    s = d*d*3.14;
    printf("chu vi hinh chon la: %f",c);
printf("\ndien tich hinh tron: %f",s);
    return 0;
}


Bài 3

#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
    float l;
    int t;
printf("nhap vao tuoi:");
    scanf("%d",&t);
    printf("nhap vao luong:");
    scanf("%f",&l);
    printf("Tuoi la:%d\n",t);
    printf("luong la:%f",l);
   
    return 0;
}



Mail Facebook Google twitter
Từ khóa: Session 03 - Lab

Session 03 - Lab

Bài viết Session 03 - Lab
Session 03 - Lab Session 03 - Lab
910 1

Bài viết Session 03 - Lab

Son [Ad]
lúc 20:57 25 tháng 5, 2015