You are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the list. One of the integers is missing from the list. Print that number (It's guaranteed that this number always exists)
The input is divided into 2 parts
N- the size of the array (N is always greater than 1)
A-the array
مرحبا
لدي هذا السؤال لقد قمت بالاجابة عليه بهذا الكود
#include <iostream>
#include <string>
int main()
{
std::cout << "hello world ";
}
ما هو الخطأ
شكرا
لدي خمسة قيم إدخال و"average" method ، اريد ان احسب متوسط قيمة قيم الإدخال الخمسة داخل "average" method وأعدها.ملاحظة: المتوسط هو إجمالي مجموع القيم مقسومًا على العدد.
public class MyCalculator {
int input1 = 10;
int input2 = 20;
int input3 = 30;
int input4 = 40;
int input5 = 50;
public float average() {
// TODO: write java code to calculate the average for all input variables
return 0;
}
}
وهذا هو الكود