QA › Programming

Programming answers to 11 questions

Communication in computers happens through programming languages. These are sets of commands and rules that instruct a computing device to carry out specific tasks. Typical examples include JavaScript, PHP, Python and HTML programming languages. The HyperText Markup Language (HTML) is…
4 Views
Simply insert this condition: if (userAge >= 18 && userAge <= 25) {
1 Views
Generally, primitive data types is Java include char, float, double, boolean, short, int, long, byte. In turn, non-primitive types are classes, arrays, and string. So, the correct answer is A - String
1 Views
All you need to do here is to changes the lines order. #include <iostream> using namespace std; int main() { int userNum; cout<<"Enter a number"<<endl; cin >> userNum; if (userNum > 0){ cout << "Positive." << endl; } else{ cout…
1 Views
Answer: avgKids = static_cast<double>(numKidsA + numKidsB + numKidsC) / static_cast<double>(numFamilies);  
4 Views
Hi! That's simple - just insert this string: if (userInput.at(0) == firstLetter) {
2 Views
Here's your solution, integrated into the code: #include #include #include using namespace std; int main() { bool hasDigit; string passCode; hasDigit = false; passCode = "abc"; /* Your solution goes here */ if (isdigit(passCode.at(0)) || isdigit(passCode.at(1)) || isdigit(passCode.at(2))) { hasDigit…
1 Views
The port is what we call HDMI, that is, High- Definition Multimedia Interface in full. The HDMI is a computer port that can be used to communicate video and audio data from a source with HDMI to another. That is,…
4 Views
import java.util.Scanner; public class Test { public static void main(String args[]) { Scanner s = new Scanner(System.in); System.out.println("Enter the radius of a circle: "); double radius; do { double temp = s.nextDouble(); radius = (temp < 0) ? -1 :…
2 Views
<p style="background-color:grey;color:green;">your text your text </p>
8 Views
#include <stdlib.h> /* rand() */ #include <time.h> /* time() */ #include <stdio.h> /* printf() */ #define N_OF_FRIENDS 3 #define MAX_MOTHER_CARE 10 #define MIN_MOTHER_CARE 1 int main() { const unsigned SIZE = N_OF_FRIENDS; int ArrayA[N_OF_FRIENDS] = { 0 }; /* initialize…
3 Views