VCT tính P = An * Xn + An-1 * Xn-1 + ... + A1 * X + A0

VCT tính P = An * Xn + An-1 * Xn-1 + ... + A1 * X + A0

VCT tính P = An * Xn + An-1 * Xn-1 + ... + A1 * X + A0

Đáp án

program luythua;

Uses Crt;
Type Mang = ARRAY[1..50] Of Integer;
Var A:Mang;
 N,i, j,x, k, Sum:Integer;

function luythua(x,n: integer) : longint;

var i: integer; T:longint;

begin

    T:=1;

    for i:= 1 to n do T:=T*x;

    luythua :=T;

end;
    
    
Begin
    {Nhap mang}
    Write('Nhap N='); Readln(N);
    For i:=1 To N Do
        Begin
            Write('A[',i,']='); Readln(A[i]);
        End;
    
    {Nhap X}
    write ('Nhap x='); readln (x);    

    {tong day so}    
    Sum:= 0;
    For k:=N + 1 downto i Do
        Sum := Sum + (A[k] * luythua(x, k));
        
    {In kết quả ra màn hình}
    Writeln('Tong cua day so: ', Sum);

    Readln;
 
 End.

Hình minh họa

Bạn thấy bài viết này như thế nào?: 
Average: 10 (3 votes)
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Bình luận (0)

 

Add Comment

Filtered HTML

  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Các thẻ HTML được chấp nhận: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Tự động ngắt dòng và đoạn văn.

Plain text

  • No HTML tags allowed.
  • Các địa chỉ web và email sẽ tự động được chuyển sang dạng liên kết.
  • Tự động ngắt dòng và đoạn văn.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
A review of the Samsung GALAXY Tab 10.1

A review of the Samsung GALAXY Tab 10.1

The Samsung GALAXY Tab 10.1 is seen as Samsungs response to iPad 2 tablet. This sleek phone features a wide screen display that is both sharp and bright, yet fitted in a body that is super slim.

Adding a Slideshow to Drupal

Thêm 1 Slideshow cho Drupal site như thế nào?

This week's tutorial was requested by a student in our Drupal forum. They wanted to know how to add a slideshow to their Drupal site.

Tham khảo 5 công cụ check backlink

Tham khảo 5 công cụ kiểm tra backlink

Ahrefs.com : Công cụ mà chúng tôi và rất nhiều người dùng, tool này cũng tương đối chuẩn. Thống kê lượng backlink mới, backlink bị mất, số lượng backlink của từng từ khóa…

Công ty diệt chuột T&C

 

Diet con trung