Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
n = 95
s = None
if 90 <= n <= 100:
s = "A"
elif 80 <= n < 90:
s = "B"
elif 70 <= n < 80:
s = "C"
elif 60 <= n < 70:
s = "D"
else:
s = "F"
print("Nota: {0} {1}".format(s, n))
if n>=60:
print("Aprobado")
else:
print("Desaprobado")
print( "Aprobado" if n >= 60 else "Desaprobado" )
n = 95
s = None
if 90 <= n <= 100:
s = "A"
elif 80 <= n < 90:
s = "B"
elif 70 <= n < 80:
s = "C"
elif 60 <= n < 70:
s = "D"
else:
s = "F"
print("Nota: {0} {1}".format(s, n))
if n>=60:
print("Aprobado")
else:
print("Desaprobado")
print( "Aprobado" if n >= 60 else "Desaprobado" )
#include <iostream>
using namespace std;
int main()
{
int n, i;
float num[100], sum = 0.0, average;
cout << "Enter the numbers of data: ";
cin >> n;
while (n > 100 || n <= 0)
{
cout << "Error! number should in range of (1 to 100)." << endl;
cout << "Enter the number again: ";
cin >> n;
}
for (i = 0; i < n; ++i)
{
cout << i + 1 << ". Enter number: ";
cin >> num[i];
sum += num[i];
}
average = sum / n;
cout << "Average = " << average;
return 0;
}
}
import java.util.*;
public class HelloWorld
{
public static void main(String []args)
{
Scanner scan = new Scanner(System.in);
System.out.println("Enter the values of a and s");
int a = scan.nextInt();
String s = scan.next();
System.out.printf("%15s%d",s,a);
}
}