Answer:
The code below is implemented using C++.
Explanation:
#include <iostream>
#include <string>
using namespace std;
double timesTen(double num);
int main()
{
double num,tentimesnum;
int i=0;
cout << "Enter number: ";
cin >>num;
tentimesnum=timesTen(num);
int a = 1;
// while loop execution
while( a <= 10 )
{
cout << "value of "<< a <<": "<< tentimesnum << endl;
a++;
}
return 0;
}
double timesTen(double num)
{
return num*10.0;
}
Answer:
<em>This program is written in C++</em>
<em>Comment are used to explain difficult lines</em>
<em>The first program that prints 0 to 20 (in decimal) starts here</em>
#include<iostream>
int main()
{
//Print From 0 to 20
for(int i = 0;i<21;i++)
{
std::cout<<i<<'\n';
}
}
<em>The modified program to print 0 to 20 in hexadecimal starts here</em>
#include<iostream>
using namespace std;
int main()
{
//Declare variables to use in conversion;
int tempvar, i=1,remain;
//Declare a char array of length 50 to hold result
char result[50];
//Print 0
cout<<"0"<<endl;
// Iterate from 1 to 20
for(int digit = 1; digit<21; digit++)
{
//Start Conversion Process
//Initialize tempvar to digit (1 to 20)
tempvar = digit;
while(tempvar!=0)
{
//Divide tempvar by 16 and get remainder
remain = tempvar%16;
if(remain<10)
{
result[i++]=remain + 48;
}
else
{
result[i++] = remain + 55;
}
//Get new value of tempvar by dividing it by 16
tempvar/=16;
}
//Print result
for(int l=i-1;l>0;l--)
{
cout<<result[l];
}
i=1;
cout<<endl;
}
return 0;
}
//The Program Ends Here
See Attachments for program 1 and 2; program 2 is the modified version of 1
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
cpp
</span>
Answer:
The answer to this question is: Information
An information system is a set of command that i used to analyze available information in order to create a better decision for the company.
Which means that information will not be able to do any function of it does not possess the initial information, to begin with, so we can conclude that information is a major component of the information systems. hope this makes sense in your mind lol
Explanation:
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
int main()
{
float marks;
cout<<"Enter your grade value :";
cin>>marks;
if(marks>=90)
cout<<"Your grade is 'A'";
else if(marks>=80&& marks<90)
cout<<"Your grade is 'B'";
else if(marks>=70&& marks <=80)
cout<<"Your grade is 'C'";
else if(marks>=60&& marks <70)
cout<<"Your grade is 'D'";
else
cout<<"Your grade is 'F'";
}
Answer:
the consecutive two elements and swap them based on the value which is larger if we go for ascending order
Explanation:
bubble sort compares 2 consecutive elements of the list and swap them. in one iteration one value will be placed correctly depending on the sorting order either ascending or descending