السلام عليكم ورحمة الله وبركاته:
لو سمحتو اللي يقدر يساعدنا فحل مسائل فاليتا ستركتر1 ومحتاج الحل ضروري اليوم او حتى الفكرة ومشكورين
1- converting an uppercase to lower case ,write a method that converts an uppercase letters to a lowercase letters .Use the following method header:
public static char UppercaseToLowerCase(char ch)
the offset between any uppercase letters and its corresponding lowercase letters is the same.So we can use the following:
int offset = (int)'a' - (int)'A';
char lowercase = (char)((int)uppercase+offset);
2-(summing the digits in an integer)Write a method that computes the sum of the digits in an integer . use the following method header:
public static int sumDigits(long n)
for example;sumDigits(234)return 2+3+4=9.
3-(Display an integer reversed)write the following method to display an integer in reverse order:
public static void reverse(int number)
for example ,reverse (3456)display
6543.
4-(Return an integer reversed)write the following method to return an integer in reverse order:
public static int reverse(int number)
for example ,reverse (3456)return
6543.
5- (Sorting three nuumbers)write the following method to display three numbers in increasing order:
public static void sort(double num1,double num2,double num3)
6-(Displaying matrix of 0s and 1s)write amethod that displays an n by n matrix using the following header:
public static void printMatrix(int n)
each element is 0 oor 1, which has generated randomly .Write a test program that prints a 3 by 3 matrix that may look like this:
0 1 0
0 0 0
1 1 1
لو سمحتو اللي يقدر يساعدنا فحل مسائل فاليتا ستركتر1 ومحتاج الحل ضروري اليوم او حتى الفكرة ومشكورين
1- converting an uppercase to lower case ,write a method that converts an uppercase letters to a lowercase letters .Use the following method header:
public static char UppercaseToLowerCase(char ch)
the offset between any uppercase letters and its corresponding lowercase letters is the same.So we can use the following:
int offset = (int)'a' - (int)'A';
char lowercase = (char)((int)uppercase+offset);
2-(summing the digits in an integer)Write a method that computes the sum of the digits in an integer . use the following method header:
public static int sumDigits(long n)
for example;sumDigits(234)return 2+3+4=9.
3-(Display an integer reversed)write the following method to display an integer in reverse order:
public static void reverse(int number)
for example ,reverse (3456)display
6543.
4-(Return an integer reversed)write the following method to return an integer in reverse order:
public static int reverse(int number)
for example ,reverse (3456)return
6543.
5- (Sorting three nuumbers)write the following method to display three numbers in increasing order:
public static void sort(double num1,double num2,double num3)
6-(Displaying matrix of 0s and 1s)write amethod that displays an n by n matrix using the following header:
public static void printMatrix(int n)
each element is 0 oor 1, which has generated randomly .Write a test program that prints a 3 by 3 matrix that may look like this:
0 1 0
0 0 0
1 1 1
تعليق