1 solutions

  • 0
    @ 2025-11-5 16:18:02

    C :

    #include<stdio.h>
    int main(){
    	int i,j,k,h;
    	int a,b,c,d;
    	scanf("%d %d %d %d",&i,&j,&k,&h);
    	scanf("%d %d %d %d",&a,&b,&c,&d);
    	int sum=a*i+b*j+c*k+d*h;
    	printf("%d\n",sum);
    	return 0;
    }
    

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a,b,c,d,a1,b1,c1,d1;
    int main()
    {
    	cin>>a>>b>>c>>d>>a1>>b1>>c1>>d1;
    	cout<<a*a1+b*b1+c*c1+d*d1;
       return 0;
    }
    
    

    Pascal :

    var
      a,b,c,d,e,f,g,h,m:longint;
    begin
      readln(a,b,c,d);
      readln(e,f,g,h);
      m:=a*e+b*f+c*g+d*h;
      writeln(m);
    end.
    
    
    • 1

    Information

    ID
    17659
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By