InstagramTwitterSnapChat


 
وصف

العودة   منتديات سكاو > الكليات الجامعية > منتدى كلية الحاسبات وتقنية المعلومات > المنتدى العام لكلية الحاسبات وتقنية المعلومات
   
   


المنتدى العام لكلية الحاسبات وتقنية المعلومات قسم خاص بالمواد العامة و الطلاب غير المتخصصين بكلية الحاسبات وتقنية المعلومات

تدرس / تدرسي java او++ c وعندك سؤال .. تعـال / تعالي هنا

المنتدى العام لكلية الحاسبات وتقنية المعلومات

 
 
أدوات الموضوع إبحث في الموضوع انواع عرض الموضوع
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 26-03-2010, 03:56 PM   #38

BeeroOo

جامعي

الصورة الرمزية BeeroOo

 
تاريخ التسجيل: Dec 2009
التخصص: تقنية معلومات
نوع الدراسة: إنتظام
المستوى: الخامس
الجنس: أنثى
المشاركات: 77
افتراضي رد: تدرس / تدرسي java او++ c وعندك سؤال .. تعـال / تعالي هنا

السلام عليكم
ممكن الله يخليكم احد يشوف الكود دا صحيح مع العلم انو البرنامج عندي يعطيني انو العمليه اكتملت وبس ومايطلع لي ولا شي ولا كاني كتبت شي
import java.lang.*;
import java..*;
import java.util.*;
//..................................

public class Lap3 {

public static void main(String[] args) {
Scanner input=new Scanner(System.in);
String fullName,part1,x,y,z,space;
//...................................
Date d=new Date();
SimpleDateFormat sdf=new SimpleDateFormat("ddMMYYYY");
int date,r,a;
float f,s;
//...........................................
System.out.println("Enter your full name");
fullName=input.nextLine();
x=fullName.substring(1,2);
System.out.println(x);
//..................................
space=(" ");
fullName=fullName.substring(fullName.indexOf(space )+1,fullName.length());
y=fullName.substring(1,2);
System.out.println(y);
//............................
fullName=fullName.substring(fullName.indexOf(space )+1,fullName.length());
z=fullName.substring(1,2);
System.out.println(z);
//..................................................
System.out.println("the first part of the acount user Name will be :"+x+y+z+"\n");
System.out.println("the second part of the acount user Name will be:"+sdf.format(d));


//......................................
Random random=new Random();
r=random.nextInt(5)+1;
System.out.println("\n"+"\n"+"A random integer from 1 to 5 is:"+r);

//..............
f=Math.random();
System.out.println("\n"+"\n"+"A random float from 0 to 1 is:"+f);
//...........
DecimalFormat df=new DecimalFormat("0.000");
s=Math.pow(f,r);
System.out.println("\n"+"\n"+"A resault of raising the float number "+f+"to the integer number "+r+"is:"+s);
System.out.println("\n"+"\n"+"After round the number is:"+df.format(s));
//................
a=Math.abs(s);
System.out.println("\n"+"\n"+"abslut of the result is:"+a);
o=Math.ceil(s);
System.out.println("\n"+"\n"+" the result after round is:"+o);
System.out.println(".............................. .................\n\n"+x+y+z+"_"+sdf.format(d)+o+" \n");
}
}

 

BeeroOo غير متواجد حالياً   رد مع اقتباس
 

 

أدوات الموضوع إبحث في الموضوع
إبحث في الموضوع:

البحث المتقدم
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

 


الساعة الآن 12:05 AM


Powered by vBulletin® Version 3.8.9 Beta 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Ads Organizer 3.0.3 by Analytics - Distance Education

أن كل ما ينشر في المنتدى لا يمثل رأي الإدارة وانما يمثل رأي أصحابها

جميع الحقوق محفوظة لشبكة سكاو

2003-2025