Answer: in C
#include <stdio.h>
int main(){
int num1, num2;
printf("Enter first number :: ");
scanf("%d", &num1);
printf("Enter second number :: ");
scanf("%d", &num2);
if(num1 > num2){
printf("%d is larger than %d\n", num1, num2);
} else if (num2 > num1) {
printf("%d is larger than %d\n", num2, num1);
} else{
printf("Both of them are equal\n");
}
return 0;
}
Answer:
Ok, so it's not letting me submit a text response, so I'll attach an image of my answer.
Explanation:
Answer:C) Uninterruptible power supply
Explanation:Uninterruptible power supply(UPS) is the device that is used when the input source of power does not work or fails and thus it acts as a power supply in the emergency situation.This electronic devices in the protection of the hardware components of computer system etc.
Other option are incorrect because power strips, surge protector and password generator are no the devices that work during the power black out situation.Thus, the correct option is option(C).
Explanation:
it can take up a great deal of time in class.
it can be distracting in the middle of a lecture.
it can cause the student to miss information.
Answer:
C++.
Explanation:
#include <iostream>
#include <string>
using namespace std;
////////////////////////////////////////////////////////////////////////////
int sumDigits(string alphanumeric) {
if (alphanumeric.length() == 1) {
if ((int(alphanumeric[0]) >= 48) && (int(alphanumeric[0]) <= 57)) {
cout<<int(alphanumeric[0]) - 48<<endl;
return (int(alphanumeric[0]) - 48);
}
else
return 0;
}
else {
if ((int(alphanumeric[0]) >= 48) && (int(alphanumeric[0]) <= 57)) {
cout<<int(alphanumeric[0]) - 48<<endl;
return int(alphanumeric[0]) - 48 + sumDigits(alphanumeric.substr(1, alphanumeric.length()-1));
}
else
return 0 + sumDigits(alphanumeric.substr(1, alphanumeric.length()-1));
}
}
////////////////////////////////////////////////////////////////////////////
int main() {
cout<<"Sum: "<<sumDigits("ab1c2d3e54");
return 0;
}