Answer:
//Program was implemented using C++ Programming Language
// Comments are used for explanatory purpose
#include<iostream>
using namespace std;
unsigned int second_a(unsigned int n)
{
int r,sum=0,temp;
int first;
for(int i= 1; I<=n; i++)
{
first = n;
//Check if first digit is 3
// Remove last digit from number till only one digit is left
while(first >= 10)
{
first = first / 10;
}
if(first == 3) // if first digit is 3
{
//Check if n is palindrome
temp=n; // save the value of n in a temporary Variable
while(n>0)
{
r=n%10; //getting remainder
sum=(sum*10)+r;
n=n/10;
}
if(temp==sum)
cout<<n<<" is a palindrome";
else
cout<<n<<" is not a palindrome";
}
}
}
Explanation:
The above code segments is a functional program that checks if a number that starts with digit 3 is Palindromic or not.
The program was coded using C++ programming language.
The main method of the program is omitted.
Comments were used for explanatory purpose.
Answer:
- <em><u> Land, labor, and capital </u></em>
Explanation:
The <em>factors of production </em>are the resources that are used to produce goods and services.
By definition resources are scarce.
<em>Land</em> includes everything that comes from the land, that can be used as raw material to produce other materials; for instance, water, minerals, wood.
<em>Labor</em> is the work done by anybody, not just at a factory but at any enterpise that produce a good or a service. For instance, the work done by a person in a bank or a restaurant.
<em>Capital</em> is the facilites (buildings), machinery, equipments, tools that the persons use to produce goods or services. For instance, a computer, a chemical reactor, or a pencil.
Nowadays, also entrepreneurship is included as a <em>factor of production</em>, since it is the innovative skill of the entrepeneurs to combine land, labor and capital what permit the production of good and services.
Answer:
D. a triangle and a T-Square
Explanation:
A T-Square is the best drawing tool to create squares. You would need a squares to create cubes.
Answer:
The given grammar is :
S = T V ;
V = C X
X = , V | ε
T = float | double
C = z | w
1.
Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.
From the given grammar,
Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.
No other variables generate variable X or ε.
So, only variable X is nullable.
2.
First of nullable variable X is First (X ) = , and ε (epsilon).
L.H.S.
The first of other varibles are :
First (S) = {float, double }
First (T) = {float, double }
First (V) = {z, w}
First (C) = {z, w}
R.H.S.
First (T V ; ) = {float, double }
First ( C X ) = {z, w}
First (, V) = ,
First ( ε ) = ε
First (float) = float
First (double) = double
First (z) = z
First (w) = w
3.
Follow of nullable variable X is Follow (V).
Follow (S) = $
Follow (T) = {z, w}
Follow (V) = ;
Follow (X) = Follow (V) = ;
Follow (C) = , and ;
Explanation: