Explanation:
z3d33sxurljt 36f
3fभथठभदाफमदखज्ञफादफज्ञादफज्ञिलफ इऋबिअऋब
Answer:
// Program is written in C++ Programming Language
// Comments are used for explanatory purpose
#include<iostream>
using namespace std;
int main ()
{
// Variable declaration
string name;
int numQuestions;
int numCorrect;
double percentage;
//Prompt to enter student's first and last name
cout<<"Enter student's first and last name";
cin>>name; // this line accepts input for variable name
cout<<"Number of question on test"; //Prompt to enter number of questions on test
cin>> numQuestions; //This line accepts Input for Variable numQuestions
cout<<"Number of answers student got correct: "; // Prompt to enter number of correct answers
cin>>numCorrect; //Enter number of correct answers
percentage = numCorrect * 100 / numQuestions; // calculate percentage
cout<<name<<" "<<percentage<<"%"; // print
return 0;
}
Explanation:
The code above calculates the percentage of a student's score in a certain test.
The code is extracted from the Question and completed after extraction.
It's written in C++ programming language
Answer:
import java.util.Scanner;
public class SumVectorElements
{
public static void main(String[] args)
{
final int NUM_VALS = 4;
int[] origList = new int[NUM_VALS];
int[] offsetAmount = new int[NUM_VALS];
int i = 0;
origList[0] = 40;
origList[1] = 50;
origList[2] = 60;
origList[3] = 70;
offsetAmount[0] = 5;
offsetAmount[1] = 7;
offsetAmount[2] = 3;
offsetAmount[3] = 0;
/* Your solution goes here */
// Print the Sum of each element in the origList
// with the corresponding value in the
// offsetAmount.
for (i = 0; i < NUM_VALS; i++)
{
System.out.print((origList[i] + offsetAmount[i])+" ");
}
System.out.println("");
return;
}
}
Explanation: see attachment below