Answer:
Notifying the errors is always useful .
Explanation:
The errors should always be notified to the developer. It is useful and is important. When we provide notifications on the screen, it helps the user and it can be used to provide feedback. In regard to developmental work, it has to be important and confidential and we use the help of email to inform or notify errors to the organization. This will help the company from negative criticism and helps the company perform better. We can also write an error log when we face the same error again and again even after notifying the developer organization. This helps to put a reminder to the organization that immediate check has to be dome and eliminate the error from the source.
Some disadvantages are if we do not keep timer implementation, the alert keeps on popping on the screen, which is irritable.
Write a program that prompts the user to enter three words. The program will then sort the words in alphabetical order, and display them on the screen. The program must be able to support words with both uppercase and lowercase letters. You must use C style strings (string class).
Answer:
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
bool sorter(string a, string b)
{
return a<b;
}
int main(){
string wordList[3];
string word;
for (int i = 0; i < 3; i++){
cout<< "Enter word: ";
cin>> word;
wordList[i] = word;
}
sort(wordList, wordList+3, sorter);
for (int i = 0; i < 3; i++){
cout<< wordList[i]<< "\n";
}
}
Explanation:
The C++ source code prompts the user for string words that are appended to the wordList array. The array is sorted with the sort() function from the C++ bits library. The finally for loop statement prints out the items in the array.
The factorial of n is equal to ______.
Answer:
n! = n*(n-1)*(n-2)*(n-3)* ... *2*1
Explanation:
The factorial operator is simply a mathematical expression of the product of a stated integer and all integers below that number down to 1. Consider these following examples:
4! = 4 * 3 * 2 * 1
4! = 12 * 2 * 1
4! = 24
6! = 6 * 5 * 4 * 3 * 2 * 1
6! = 30 * 4 * 3 * 2 * 1
6! = 120 * 3 * 2 * 1
6! = 360 * 2 * 1
6! = 720
So, the factorial of n would follow the same as such:
n! = n * (n-1) * (n-2) * ... * 2 * 1
Cheers.