Answer:
See explaination
Explanation:
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
// Fill in the code to define payfile as an input file
ifstream payfile;
float gross;
float net;
float hours;
float payRate;
float stateTax;
float fedTax;
cout << fixed << setprecision(2) << showpoint;
// Fill in the code to open payfile and attach it to the physical file
// named payroll.dat
payfile.open("payroll.dat");
// Fill in code to write a conditional statement to check if payfile
// does not exist.
if(!payfile)
{
cout << "Error opening file. \n";
cout << "It may not exist where indicated" << endl;
return 1;
}
ofstream outfile("pay.out");
cout << "Payrate Hours Gross Pay Net Pay"
<< endl << endl;
outfile << "Payrate Hours Gross Pay Net Pay"
<< endl << endl;
// Fill in code to prime the read for the payfile file.
payfile >> hours;
// Fill in code to write a loop condition to run while payfile has more
// data to process.
while(!payfile.eof())
{
payfile >> payRate >> stateTax >> fedTax;
gross = payRate * hours;
net = gross - (gross * stateTax) - (gross * fedTax);
cout << payRate << setw(15) << hours << setw(12) << gross
<< setw(12) << net << endl;
outfile << payRate << setw(15) << hours << setw(12) << gross
<< setw(12) << net << endl;
payfile >> hours ;// Fill in the code to finish this with the appropriate
// variable to be input
}
payfile.close();
outfile.close();
return 0;
}
If a robot is able to change its own trajectory as per the external conditions, then the robot is considered the intelligent option (A) is correct.
<h3>What is AI?</h3>
Unlike the natural intelligence exhibited by animals, including humans, artificial intelligence is a form of intelligence demonstrated by robots.
The question is incomplete.
The complete question is:
If a robot can alter its own trajectory in response to external conditions, it is considered to be:
A. intelligent
B. mobile
C. open loop
D. non-servo
E. None of the above
Robots are regarded as intelligent if they can alter their own course in response to environmental factors. These kinds of agents fall into the AI agent or Rational Agent group.
Thus, if a robot is able to change its own trajectory as per the external conditions, then the robot is considered the intelligent option (A) is correct.
Learn more about AI here:
brainly.com/question/27839745
#SPJ4
Answer:
If its any easy question, answer it yourself.
Explanation:
:)
Answer:
Grace sat quietly in a stinky stadium with her blue jacket
Grace jumped on a plane to Paris.
Grace ate bananas, apples, and guavas quietly while she listened to the news.
Grace is the name of a major character in my favorite novel
Grace was looking so beautiful as she walked to the podium majestically.
Grace looked on angrily at the blue-faced policeman who blocked her way.
C++ program for implementation of Bubble sort
#include <bits/stdc++.h>
using namespace std;
void swap(int *x, int *y) /*Defining Swap function of void return type*/
{
int temp = *x; //Swaping the values
*x = *y;
*y = temp;
}
void bubbleSort(int array[], int n) /*Defining function to implement bubbleSort */
{
int i, j;
for (i = 0; i < n-1; i++)
for (j = 0; j < n-i-1; j++) /*The last i components are already in location */
if (array[j] > array[j+1])
swap(&array[j], &array[j+1]); //Calling swap function
}
int main() //driver function
{
int array[] = {3, 16, 7, 2, 56, 67, 8}; //Input array
int n = sizeof(array)/sizeof(array[0]); //Finding size of array
bubbleSort(array, n); //Function calling
cout<<"Sorted array: \n";
for (int i = 0; i < n; i++) //printing the sorted array
cout << array[i] << " ";
cout << endl;
return 0;
}
<u>Output</u>
Sorted array:
2 3 7 8 16 56 67