Answer:
b. to the end of the line
Explanation:
Great question, it is always good to ask away and get rid of any doubts that you may be having.
Python is a unique language compared to other languages such as Java and C++. In Python comments are started with the comment marker which is the hashtag (#) symbol and continues <u>to the end of the current line</u>. Once the line ends the next line is <u>NOT</u> automatically considered a comment unless another hashtag is placed.
I hope this answered your question. If you have any more questions feel free to ask away at Brainly.
int sum = 0, n;
do {cin>>n; sum+=n;}while (n!=0);
cout<<sum;
Answer: D. Enable the remote Assistance exception only on the private profile
Explanation:
Answer:
see explaination
Explanation:
#include <iostream>
#include <string>
using namespace std;
class LinkedList{
class Node{
public :
int data;
Node* next;
Node(int data){
this->data = data;
next = NULL;
}
};
public :
Node *head;
LinkedList(){
this->head = NULL;
}
void insert(int d){
Node* new_node = new Node(d);
new_node->next = head;
head = new_node;
}
// sort the list with selection sort algorithm.
// Pick the smallest element in the unsorted array and place in the first element in the unsorted.
void sort_list(){
if (head == NULL){
return;
}
Node* current = head;
while (current->next != NULL){
Node* min_node = current;
Node* traverse = current->next;
while(traverse != NULL){
if(traverse->data < min_node->data){
min_node = traverse;
}
traverse = traverse->next;
}
int temp = current->data;
current->data = min_node->data;
min_node->data = temp;
current = current->next;
}
}
void print_list(){
Node* current = head;
while(current !=NULL){
cout<<current->data<<" ";
current = current->next;
}
cout<<"\n";
}
};
int main(){
LinkedList ll;
for(int i=0;i<10;i++){
ll.insert(i);
}
ll.print_list();
cout<<"*******************************************\n";
ll.sort_list();
ll.print_list();
cout<<"*******************************************\n";
}