Học lập trình chất lượng cao từ STDIO Training
STDIO TRAINING - LẬP TRÌNH TỪ NỀN TẢNG
GregorianCalendar ngayNhapTay =new GregorianCalendar();
	System.out.println("Nhap ngay dang [dd/MM/yyyy]: ");
		String ngay=new Scanner(System.in).nextLine();
		SimpleDateFormat df=new SimpleDateFormat("dd/MM/yyyy");
		Date d=df.parse(ngay);
		ngayNhapTay.setTime(d);


		Obj newObj = new Obj(ma, ngayNhapTay, , , , );
#include(stdio.h)
void chuyen(int n, char a, char b){
    print("Chuyen dia thu " , n," tu coc ", a, " sang coc ", c)
}

void thapHaNoi(int n, char a, char b, char c){
    if( n == 1 )
        chuyen(1,a,c);
    else {
        thapHaNoi(n-1, a, c, b);
        chuyen(n, a, c);
        thapHaNoi(n-1, b, a, c);
    }
}

int main(){
    int n;
    char a = 'A', b = 'B', c = 'C';
    print("Nhap n dia : ");
    scanf("%d", n);
    thapHaNoi(n, a, b, c);
}
#include <iostream>

using namespace std;

int main()

{
    int n; float tbc;
    int S=0;
    int i=0;
    do
    {
        cout << "Nhap n:"; cin>>n;
        S=S+n;
        i++;
        tbc=float(S)/i;
    }
    while (n!=0);
    cout <<tbc;
    return 0;
}
#include<stdio.h>
#include<unistd.h>
void main(){
	int B, C, D, E, H;
	printf("\nI am A, A id = %d", getpid());
	printf("\nI'm going to create B and C");
	printf("\n---End A---\n");
	B = fork();
	if (B == 0)	{
		printf("\nI am B, B id = %d", getpid());
		printf("\nMy parent is A, A id = %d", getppid());
		printf("\n---End B---\n");
		// Here create D in B
		D = fork();
		if (D == 0)	{
			printf("\nI am D, D id = %d", getpid());
			printf("\nMy parent is B, B id = %d", getppid());
			printf("\n---End D---\n"
#include <iostream>

using namespace std;

int main()

{
    int n; float tbc;
    int S=0;
    int i=0;
    do
    {
        cout << "Nhap n:"; cin>>n;
        S=S+n;
        i++;
        tbc=S/i;
    }
    while (n!=0);
    cout <<tbc;
    return 0;
}
#include <iostream>
#define maxn 250

using namespace std;

int main()

{
    int a[maxn];
    int s=1;
    int n,i,j;
    cout << "Nhap n:";cin >> n;
    for(i=1;i<=n;i++)
    {
        cout << "Nhap a["<<i<<"]=";
        cin >> a[i];
    }
    for (i=1;i<=n-1;i++)
    {
        for (j=n;i>=i+1;j--)
        {
            if (a[i]==a[j])
            {
             s=s+1;
            }
        }
    }
    cout << "so lan xuat hien la "<<s;
    return 0;
}
Nhân đẹp trai visibility
#include<stdio.h>
#include<conio.h>
int lietkent(int n)
{ int diem=0;
	for(int i=1;i<=n;i++)
	{if(n%i==0) diem++;
	}
	if(diem==2) return 1;
}
int main()
{
	int n,s=0;
	printf("nhap n=");
	scanf("%d",&n);
	for (int i=1;i<n;i++)
	 { if(lietkent(i)==1) {
	 printf("%5d",i) ;s=s+i ;}

	 }
	 printf("\ntong các so nguyen to tu 1 den n là :",s);
}
#include<stdio.h>
#include<conio.h>
int lietkent(int n)
{ int dem=0,demt=0,s=0;
  float tb;
	for(int i=1;i<=n;i++)
	{
	 for(int j=1;j<=i;j++)	
	 {if(i%j==0) dem++;}
     if(dem==2) { s=s+i; demt=demt+1;}
    }
	tb=s/demt;
	printf("trung binh cua cac so nguyen to la: %d",tb);
	
}
int main()
{
	int n;
	printf("nhap n=");
	scanf("%d",&n);
    lietkent(n);
    return 0;
 }
int x;
	int a, b, c;
	scanf_s("Nhap vao gia tri: %d:", &x);
	a = x / 100;
	b = (x - a * 100) / 10;
	c = x - a * 100 - b * 10;
	printf("%d", a+b+c);
@RequestMapping(value = { "/create-form" }, method = RequestMethod.GET)
	public String createFormClass(ModelMap model) {
		model.addAttribute("classMate", new ClassMate());
		return "classNew";
	}
	
	
	@RequestMapping(value = { "/create" }, method = RequestMethod.POST)
	public String createClassMate(@Valid ClassMate  classMate, BindingResult result, ModelMap model) {
		Branch branch = branchService.findOne(getBranchId());
		classMate.setName(classMate.getName());
		classMate.setCode(classMate.getCode());
first_page
chevron_left
1
chevron_rightlast_page