Cicily is organizing a typing competition. Each participant who clears the competition receives a certificate and a cash prize. The initial mark is ten. For each mistake made, one mark is reduced. If the participant's score is an absolute value, he/she will be rewarded. Can you help Cicily to write a program where she enters the id of a participant and the score obtained, and the program should print the result for that candidate.
Id and marks is of integer type.
Answers
Answered by
25
Answer:
#include<iostream>
using namespace std;
int main()
{
int x,y;
std::cin>>x>>y;
if(y>0)
{
std::cout<<x<<" is eligible to reward.";
}
}
Explanation:.
Answered by
0
Program to print the result and the score obtained is:-
#include<iostream>
int main()
{
int id,marks;
std::cin>>id>>marks;
if((marks>=0)&&(marks<=10))
std::cout<<id<<" is eligible for reward.";
}
- In the above-written program, a library file iostream has been included.
- Now, two variables are declared and the value is taken from the user.
- Then if condition statement is used and the name of eligible students is printed.
#SPJ3
Similar questions