1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
hichkok12 [17]
3 years ago
5

write a program using if condition and print fail and try again if student marks are less than 33 using if condition and print f

ail and try again if student marks are less than 33
Computers and Technology
1 answer:
Aliun [14]3 years ago
6 0

Answer:

Following are the program to this question:

#include <iostream>//defining a herader file

using namespace std;

int main()//defining main method

{

   int marks, i=35;//defining integer variables

   cout<<"enter your marks in a percent: ";//print message

   cin>>marks;//input marks value

   if(marks<i)//defining if block that checks marks less then i

   {

       cout<<"fail and try again";//print message

   }

   else//defining else block

   {

       cout<<"You are qualified";//print message

   }

   return 0;

}

Output:

enter your marks in a percent: 33

fail and try again

Explanation:

In the above-given, C++ language code inside the main method "marks and i" two integer variable is declared, in which the "i" variable holds a value.

In the next step, if block is defined, that checks "marks" value is less than "i", if the value is true, it will print "fail and try again".

Otherwise, it will go to the else block, in this, it will print "You are qualified".

You might be interested in
How did the use of ARPANET change computing?
Paladinen [302]

Answer:

Explanation:

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

PLEASE MARK BRAINLIESTPLEASE MARK BRAINLIEST

8 0
3 years ago
The first step in creating photographs with good backgrounds is which of the following? Learning to see the background before ta
defon

Oh I got this! I'm a professional photographer! The answer is Leaning to se the background before taking the photograph.

Plz mark brainliest! So glad I could help, and Have an AWESOME day!!!

4 0
3 years ago
Read 2 more answers
Order the steps to use a logical argument as a rule type.
muminat

Answer:

Click home tab, click conditional formatting, click new rule, use formula to determine

6 0
3 years ago
Read 2 more answers
Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
wariber [46]
The correct answer is letter B. Application Software. Word Processing software, spreadsheet software, database software, and presentation software are examples of Application software. These are applications that are mostly output based.
8 0
3 years ago
The LList class is (mostly) the same one discussed in lecture, but you must write a sort() function that uses one of the three i
Vladimir79 [104]

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";

}

8 0
3 years ago
Other questions:
  • Consider this scenario: A major government agency experiences a data breach. As a result, more than 100,000 personal records are
    7·2 answers
  • You've decided to use a subnet mask of 255.255.192.0 with your 172.17.0.0 network to create four separate subnets. The network I
    13·1 answer
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • Investments in data networks, ip addresses, routers, and switches are ________ because of their impact on productivity, security
    14·1 answer
  • What was the first fully computer animated feature film?
    13·1 answer
  • Project using simple formulas
    15·1 answer
  • Write a Program in C language using arrays:
    14·1 answer
  • My name Jeff <br><br> what movie is this off of
    6·2 answers
  • Which audio media can be directly sent to the subscribers through an RSS feed?
    6·1 answer
  • PLEASE HELP! :)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!