[My site ]
Main » 2013 » December » 12
write program print out the factorial of n integer values , the program passes each integers value to a function called factorial that calculates the fact of an integer value

#include"stdio.h"

int factorial(int f);

main()
Category: C Programming - 1 | Views: 344 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program print that pattern by while statement

+*+*+*+
*+*+*+*
+*+*+*+
*+*+*+*

#include"stdio.h"
Category: C Programming - 1 | Views: 312 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program that reads value of x and compute the value of y from the following equation
y = -x + x^2 - x^3 + x^4

#include"stdio.h"

int p(int m, int n);

main()
Category: C Programming - 1 | Views: 351 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

what is output ,, val = 316 :

#include"stdio.h"
main()
{
long val, sum=0, n;
Category: C Programming - 1 | Views: 410 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program that reads a sequence of integers when a negative number is read that many asterisk are to print ,, when a positive number is read that the factorial of the number is to be printed

#include<stdio.h>
main()
{
int i, n, val, j, fact;
Category: C Programming - 1 | Views: 352 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program perform the addition, subtraction, division or multiplication ,, the inputs to the program are two float values and arithmetic operator .use
1- if-else
2- switch

if-else :

#include<stdio.h>
Category: C Programming - 1 | Views: 410 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program that read n integer values and pass them one at a time to a function called evenodd to determine if value is even or odd ,, also another function called negative to determine if value is positive or negative 

#include<stdio.h>

void evenodd(int x;);
void negative(int y;);
Category: C Programming - 1 | Views: 405 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

write a program using while statement and conditional operator to read n integer values and calculate 
1- number and sum of odd values
2- number and sum of even values


#include<stdio.h>
main()
{
int val, n, i=1, odd=0, even=0, odds=0, evens=0;
... Read more »
Category: C Programming - 1 | Views: 351 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)


Category: Math - 1 | Views: 392 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 335 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 403 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 373 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 375 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 398 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 370 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 388 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 324 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 357 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 462 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)




Category: Math - 1 | Views: 410 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

:: Problem 1 ::


 :: Problem 2 ::
Category: Electrical Engineering - 1 | Views: 422 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

:: Problem 1 ::

:: Problem 2 ::
Category: Electrical Engineering - 1 | Views: 422 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

- توصيل اللمبة العادية :-

- توصيل لمبة فلوروسنت :-
** فائدة الـ starter  : تعويض فرق الجهد حيث أن الجهد 220 ينقسم بين الـ chock واللمبة
Category: Electrical Engineering - 1 | Views: 557 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

1- Introduction .
2- advantages and dis advantages .
3- Basic Principles of wind energy conversion .
4- emprical formula for wind power conversion .
5- Basic components of wind energy conversion ( WECs ) systems in black diagram .
6- physical bodiment of wind electric generating station in general listed form .

>>>==(O)==<<<

1- Introduction :
- It's conversion of K.E of the wind ... Read more »
Category: Energy Conversion - 1 | Views: 386 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

Chapter 6


-         introduction
- ... Read more »
Category: Energy Conversion - 1 | Views: 444 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
    int val, max, min, i;
   
    printf("enter value 1 : ");
    scanf("%d", &val);
    max=val;
   
    for(i=2;i<=5;i++){
        printf("enter value %d : ", i);
        scanf("%d", &val);
       
        if(val>max){
            max=val;
        }
        else if(val<min){
            min=val;
        }
  &nb ... Read more »
Category: C Programming - 1 | Views: 360 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
int y, z, p=1, n, i;
printf("enter z and n : ");
Category: C Programming - 1 | Views: 349 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
int main(void){
int n, i, j;
printf("enter n : ");
< ... Read more »
Category: C Programming - 1 | Views: 348 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
int main(void){
int n, i, j;
printf("enter n : ");
scanf("%d", &n);
Category: C Programming - 1 | Views: 308 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

int i=1;
while(i<=10){
cout<<"I="<<i;
}

short a;
a=1;
while(a<=10){
cout<<"A*A = "<<a*a;
Category: C Programming - 1 | Views: 361 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"

int fact(int x);

int main(void)
{
int n, m, p;
Category: C Programming - 1 | Views: 383 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
int n, i=1, j=1, sum1=0, sum2=0;
printf("enter n : ");
Category: C Programming - 1 | Views: 328 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
int n, i=1, j=1, sum1=0, sum2=0;
printf("enter n : ");
Category: C Programming - 1 | Views: 343 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
int i, array[6], x, y;
for(i=0;i<=5;i++){
Category: C Programming - 1 | Views: 403 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
char ch_array[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int i=0, j=0;
< ... Read more »
Category: C Programming - 1 | Views: 367 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
char ch_array[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int i;
Category: C Programming - 1 | Views: 323 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include"stdio.h"
main()
{
char phr[50];
printf("enter the phrase  : ");
Category: C Programming - 1 | Views: 316 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

Category: Energy Conversion - 1 | Views: 346 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

في المثال اللي فات كان الكمبيوتر بيختار رقم عشوائي في كل سطر لكن ماكانش بيتغير كان بيطلع هو هو في كل مرة تشغيل للبرنامج .. عشان نغيره هانعمله seeding random 
srand();
بس هانحطلها parameter متغير بيتغير مع كل مرة فتح للبرنامج دا هايكون
time(NULL)
هانزود سطر واحد بس ع البرنامج القديم هايكون بالشكل دا
srand(time(NULL));
Category: C Programming - 1 | Views: 338 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

عندنا function اسمها ()rand دي وظيفتها بتدي أي رقم عشوائي .



int i=0;

Category: C Programming - 1 | Views: 412 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include <stdio.h>
#include <conio.h>

int findarea(int x, int y);

int main(void)
{
Category: C Programming - 1 | Views: 363 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

هانعمل برنامج يطلب من الـ user الـ number of eyes and toes لو 2 و 10 يبقى طبيعي لو أي حاجة تانية يبقى مش طبيعي


   int eyes;
   int toes;

Category: C Programming - 1 | Views: 401 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include <stdio.h>
#include <conio.h>

int main(void)
{
int counter = 1;
Category: C Programming - 1 | Views: 363 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

 #include <stdio.h>
#include <conio.h>

int main(void)
{
int number;
Category: C Programming - 1 | Views: 359 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

#include <stdio.h>
#include <conio.h>

int main(void)
{
int counter = 1;
Category: C Programming - 1 | Views: 369 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

هانعمل برنامج يطلب من الـ user عدد الـ hotdogs اللي كلهم على مدار 5 أيام وبعدين يحسب المتوسط للـ hotdogs في اليوم الواحد ويكتبه :


#include <stdio.h>
#include <conio.h>

int main(void)
{
int loopcount;
int hotdogs;
... Read more »
Category: C Programming - 1 | Views: 436 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

هانكتب برنامج يسأل الـ user عن عمره .. لو العمر 60 يكتب you are oldest man .. لو 40 يكتبله good .. لو 21 يكتبله nice .. ولو مش أي حاجة من دول يكتبله nice to meet you :



#include <stdio.h>

#include <conio.h>


int main(void)

{

int age;

printf("Ent ... Read more »

Category: C Programming - 1 | Views: 315 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

Statements types :


1- if statement

2- switch statement


- if statement :: 3 cases :.


1- simplest case

Category: C Programming - 1 | Views: 358 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

الـ comment في البرمجة عموما دا سطر بيكتبه الـ programmer عشان يفكر نفسه بحاجة في المكان اللي كتبه في يعني ملحوظة ما بيشوفهاش غير الـ programmer ومالهاش أي تأثير في البرنامج .


ودا بيكون بالشكل دا 


/*comment is here*/

Category: C Programming - 1 | Views: 405 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

بسم الله الرحمن الرحيم

 في الدرس اللي فات كتبنا hello world في نفس السطر . لو عايزين نكتب hello في سطر و world في سطر هانكتب مابينهم n\ 

ولو هانعمل تاب t\



Category: C Programming - 1 | Views: 386 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

بسم الله الرحمن الرحيم

لغة السي لغة سهلة وبسيطة وهي لغة High Level Language يعني من ضمن اللغات الجديدة اللي اتعملت عشان تسهل على الـ programmer  وعلى الـ user يعني لو دي أول لغة برمجة تتعلمها ان شاء الله مش هاتكون صعبة .. أنا مش هارغي كتير في المقدمة وندخل في الموضوع :




Category: C Programming - 1 | Views: 362 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)