Напишите мне пожалуйста этот программный код в C++. Нужно сделать это до завтрашнего дня.
Ответы
Ответ:
#include <iostream>
int main()
{
short FirstScore = 0;
short SecondScore = 0;
short ThirdScore = 0;
short FourthScore = 0;
short PhysicalCultureScore = 0;
bool FluorographyStatus = false;
std::cout<<"FirstScore: ";
std::cin>>FirstScore;
std::cout<<"SecondScore: ";
std::cin>>SecondScore;
std::cout<<"ThirdScore: ";
std::cin>>ThirdScore;
std::cout<<"FourthScore: ";
std::cin>>FourthScore;
std::cout<<"PhysicalCultureScore: ";
std::cin >> PhysicalCultureScore;
std::cout<<"FluorographyStatus [0 or 1]: ";
std::cin >> FluorographyStatus;
if( FirstScore>=60&&
SecondScore>=60&&
ThirdScore>=60&&
FourthScore>=60&&
PhysicalCultureScore>=60&&
FluorographyStatus)
{
std::cout<<"Success";
return 0;
}
else
{
float avg_score = (FirstScore+SecondScore+ThirdScore+FourthScore)/4;
if(avg_score >= 75.0f && PhysicalCultureScore < 60 && FluorographyStatus)
{
std::cout<<"Success";
return 0;
}
else
{
std::cout<<"Denied";
return 0;
}
}
}
Объяснение:
https://pastebin.com/v4Z76bgk