Truyện hay
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Truyện hayĐăng Nhập

truyenhay cung cấp truyện và chia sẻ truyen hay - truyện hay, các thể loại truyện 18+, sac hiep, tien hiep, di hiep đã hoàn thành full


descriptiontét thư bài thi Emptytét thư bài thi

more_horiz
http://www.aprotrain.org/forum.php?mod=viewthread&tid=37

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
#include"stdio.h"
#include"conio.h"
#include"math.h"
void main ()
{
float x,s,n;
printf("\nNhap so tinh :");
scanf("%f",&x);
printf("\nCan bac:");
scanf("%f",&n);
S=pow(x,1/n);
printf("\nKet qua can bac %.0f cua %.2f la:%f",n,x,s);
getch();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
Viết chương trình S = 1+2+3+…+ n

*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
long S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+i ;
}
printf("Tong S = %ld",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1+3+5...+(2n-1)
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
long S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+(2*i-1) ;
}
printf("Tong S = %ld",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 2+4+6+...+2n
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
long S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+(2*i) ;
}
printf("Tong S = %ld",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1+1/2+...+1/n
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+(10/i) ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1+ 1/3 + 1/5 + 1/7 + ...+ 1/(2n-1)
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+1.0/((2*i)-1) ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1*2*3*...*n
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=1;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S*i ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1/2 + 2/3 + 3/4 + ...+ n/(n+1)
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=0;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S+(float)i/(i+1) ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1 + 2! + ... + n!
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=1 , S1=0 ;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S*i ;
S1=S1+S ;
}
printf("Tong S = %.2f",S1);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1 + 1/2! + ... + 1/n!
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=1 , S1=0 ;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S*i ;
S1=S1+ 1.0/S ;
}
printf("Tong S = %.2f",S1);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1^2 + 2^2 + ... + n^2
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=1 ;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S=S*i*i ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1 + 2^2 + ... + n^n
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n,j ;
float gt, S=0 ;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
gt=1;
for (j=1 ; j<=i ; j++ )
gt=gt*i;
S=S + gt ;
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh tinh S= 1 + 1/(1+2) + 1/(1+2+3) + … + 1/(1+2+…+n)
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,n ;
float S=0,S1=0 ;
printf("Nhap n = "); scanf("%d",&n);
for (i= 1 ; i<=n ; i++)
{
S1=S1+i;
S=S+ (float)(1/S1);
}
printf("Tong S = %.2f",S);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh ting tong S= 1+2+3+...+10
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
main()
{ int s,i;
i=s=0;
tong:
++i;
s=s+i;
if (i<10) goto tong;
printf("\n tong s=%d",s);
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
/* Viet chuong trinh ting giai thua S = x 1 /1! + x 2 /2! + ....+ x n / n!
TamGa www.tamga.tk tamgaalbum@yahoo.com
*/
#include <stdio.h>
#include <conio.h>
float giaithua ( int n)
{
int i ;float KQ ;
for ( KQ=1,i =1 ; i<=n ; i ++ )
KQ = KQ * i ;
return KQ ;
}
void main ( )
{
int n ;
printf ("Nhap n = "); scanf ("%d",&n);
printf ("%d giai thua la %.2f ",n,giaithua(n));
getch ();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
// Viet chuong trinh nhap so nguyen tu n
// Tinh tong cac gia tri le tu 0 den n
// TamGa www.tamga.tk tamgaalbum@yahoo.com

#include <stdio.h>
#include <conio.h>
void main (void)
{
int i, in, is = 0;
printf("Nhap vao so n: "); scanf("%d", &in);
is = 0;
for(i = 0; i<=in; i++)
{
if (i % 2 != 0) //neu i la so le
is = is + i; //hoac is += i;
}
printf("Tong: %d", is);
getch();
}

descriptiontét thư bài thi EmptyRe: tét thư bài thi

more_horiz
privacy_tip Permissions in this forum:
Bạn không có quyền trả lời bài viết
power_settings_newLogin to reply