[My site ]
Main » C Programming - 1
write a program print that pattern by while statement

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

#include"stdio.h"
Category: C Programming - 1 | Views: 320 | 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: 362 | 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: 420 | 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: 360 | 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: 420 | 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: 416 | 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: 361 | 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: 371 | 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: 356 | 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: 358 | Added by: ahansaary | Date: 2013-12-12 | Comments (0)

« 1 2 3 4 5 6 »