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

 
Pantone 19-4052 Classic Blue - màu sắc mới của năm 2020

Pantone 19-4052 Classic Blue - màu sắc mới của năm 2020

Pantone vừa mới công bố màu của năm 2020 là Classic-Blue. Màu của niềm tin, của sự tập trung và rõ ràng trong định hướng

Hướng dẫn Multi-currency shops với Drupal Commerce

Hướng dẫn Multi-currency shops với Drupal Commerce

The new Drupal Commerce module brings shop building to a new level by fully leveraging the functionalities of Drupal 7. On the other hand the great flexibility of Drupal Commerce provides so many options sometimes it's unclear how to implement the right solution.

Những điểm quan trọng trong file Settings.php của Drupal

Những điểm quan trọng trong file Settings.php của Drupal

The settings.php is unique to every site and contains all of the important information that Drupal needs to run.

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

 

Diet con trung