Forwarded from Ritaj Ali
Forwarded from Rayan
CompleteCourseNotes-Fall2023-Ch(6-2).ppt
857.5 KB
Forwarded from abrar.rt
CompleteCourseNotes-Fall2023-Ch(6-3).ppt
213 KB
مجموعة1
شوية ملاحظات ع البوينترز+ برنامج لطباعة:
عنوان الرقم الأول + عنوان الرقم الثاني = مجموعهم
#EC251L
شوية ملاحظات ع البوينترز+ برنامج لطباعة:
عنوان الرقم الأول + عنوان الرقم الثاني = مجموعهم
#EC251L
❤2
برنامج لإنشاء مصفوفة وترتيبها تصاعديا بإستخدام البوينتر
❤3
سؤال بسيط لكن عجبني.
هل الكود غلط او صح ولو غلط قولوا وين الغلط؟
Suppose we want to display the consecutive digits 0,1,2,…,9
with one digit on each line. This can be accomplished with the
following program
void main()
{
int R=0;
while ( R <= 9)
printf (“%d \n, ++R);
}
Return 0;
هل الكود غلط او صح ولو غلط قولوا وين الغلط؟
Suppose we want to display the consecutive digits 0,1,2,…,9
with one digit on each line. This can be accomplished with the
following program
void main()
{
int R=0;
while ( R <= 9)
printf (“%d \n, ++R);
}
Return 0;
أكتبلي برنامج يحسبلي مجموع ومتوسط عناصر مصفوفة ل 15 قيمة .
قسم هندسة الحاسب الالي
أكتبلي برنامج يحسبلي مجموع ومتوسط عناصر مصفوفة ل 15 قيمة .
#include <stdio.h>
void main ()
{
int i , array [20] , sum = 0 ;
float avg = 0;
for (i=0 ; i<15 ; i++)
{
printf ("Enter a number %d: ",i+1);
scanf ("%d",&array[i]);
sum = sum + array[i] ;
}
avg = sum / 15.0;
printf ("\nSum of the numbers =%d \n\nand their average =%.2f\n",sum,avg);
}
void main ()
{
int i , array [20] , sum = 0 ;
float avg = 0;
for (i=0 ; i<15 ; i++)
{
printf ("Enter a number %d: ",i+1);
scanf ("%d",&array[i]);
sum = sum + array[i] ;
}
avg = sum / 15.0;
printf ("\nSum of the numbers =%d \n\nand their average =%.2f\n",sum,avg);
}
قسم هندسة الحاسب الالي
اكتب برنامج يجمع عناصر 2 من المصفوفات .
#include <stdio.h>
#include <stdlib.h>
int main(){
int R;
printf("the size of array: ");
scanf("%d",&R);
int A[R],B[R],sum[R];
printf(" enter the alemant \n");
for(int i=0; i<R; i++){
printf("enter the element the first array %d: \t",i+1);
scanf("%d",&A[i]);
}
printf("enter the element \n");
for(int i=0; i<R; i++){
printf("\nenter the element the second array %d: \t",i+1);
scanf("%d",&B[i]);}
printf("the sum = ");
for(int i=0; 1<R; i++){
sum[i]=A[i]+B[i];
printf("%d\t ",sum[i]);
}
}
#include <stdlib.h>
int main(){
int R;
printf("the size of array: ");
scanf("%d",&R);
int A[R],B[R],sum[R];
printf(" enter the alemant \n");
for(int i=0; i<R; i++){
printf("enter the element the first array %d: \t",i+1);
scanf("%d",&A[i]);
}
printf("enter the element \n");
for(int i=0; i<R; i++){
printf("\nenter the element the second array %d: \t",i+1);
scanf("%d",&B[i]);}
printf("the sum = ");
for(int i=0; 1<R; i++){
sum[i]=A[i]+B[i];
printf("%d\t ",sum[i]);
}
}
Write a program in C to count the total number of duplicate elements in an array.
هوا مليح جربوه
كود يحسبلك كم في رقم مكرر في المصفوفة
هوا مليح جربوه
كود يحسبلك كم في رقم مكرر في المصفوفة
❤1
دعواتكم لامتحان الالكترونية غدوا و بارك الله فيكم
❤13
Forwarded from 𝙲𝙾𝙻𝙻𝙴𝙶𝙴 𝙾𝙵 𝙴𝙽𝙶𝙸𝙽𝙴𝙴𝚁𝙸𝙽𝙶 𝟸𝟶𝟶𝟹👷🏻♂️🔥
روت أم المؤمنين عائشة رضي الله عنها عن المصطفى عليه الصلاة والسلام أنه قال: (ركعتا الفجرِ خيرٌ من الدنيا وما فيها) [سنن الترمذي]
❤8