Here's the code

#include <stdio.h>

#include "stdafx.h"

int main()

{

int a1, a2, a3;

int b1, b2, b3;

int x1, x2, x3;

int c;

int d1, d2, d3;

printf("Enter vector A:\n");

scanf("%d%d%d", &a1, &a2, &a3);

printf("Enter vector B:\n");

scanf("%d%d%d", &b1, &b2, &b3);

printf("Enter value of C:\n");

scanf("%d", &c);

//calculation part

x1 = b1 * c;

x2 = b2 * c;

x3 = b3 * c;

d1 = x1 + a1;

d2 = x2 + a2;

d3 = x3 + a3;

printf("Vector D = %d %d %d", &d1, &d2, &d3);

return 0;

}

Please help, thanks

Tweet This+ 1 thisPost To Linkedin