/* 1 PROGRAM TO CALCULATE ARITHMETIC MEAN FOR INDIVIDUAL SERIES */


 /* 1 PROGRAM TO CALCULATE ARITHMETIC MEAN FOR INDIVIDUAL SERIES */

#include<stdio.h>

int main()

{

int i,n,x[10];

float sum=0,AM=0;

printf("Enter No. of observations:-\t");

scanf("%d",&n);

printf("Enter the values:-\t");

for(i=0;i<n;i++)

{

printf("\n");

scanf("%d",&x[i]);

sum=sum+x[i];

}

AM=sum/n;

printf("The Arithmetic Mean is:-\t");

printf("\n sum= %f",sum);

printf("\n AM=%f",AM);

return 0;

}

/* OUTPUT:-

Enter No. of observations : -      5

Enter the values:-

11

22

33

44

55

The Arithmetic Mean is:-

 sum= 165.000000

 AM=33.000000 */

                                                                        😊😀😚👀

                                                




                                                                     

write a program to calculate the Addition , Substraction ,Multiplication , Division, of number

                                       


 /* write a program to calculate the Addition , Substraction ,Multiplication , Division, of number*/

#include<stdio.h>

#include<conio.h>

void main()

{                int a, b, Add, Sub, Mul, Div;

                  clrscr();

                  printf("Enter a numbers =\n");

                  scanf("%d%d",&a,&b);

                  Add=a+b;

                  Sub=a-b;

                   Mul=a*b;

                   Div=a/b;

                   printf("\nAddition of No=%d",Add);

                  printf("\nSubstraction of No=%d",Sub);

                  printf("\nMultiplication of No =%d",Mul);

                  printf("\nDivision of No =%d",Div);

                  getch();

}


    /*        Output Screen :--

           Enter a number =4

             2

           Addition of No             =6

            Substraction of No      =2

            Multiplication  of No  =8

            Division of No             =2

     */

                                                    


                                                        😊😉😘

           

write a program to calculate the addition of number.

/* write a program to calculate the addition of  number.*/


#include<stdio.h>

#include<conio.h>😀

void main()

{                    int a,b,sum;

                       clrscr();

                       printf(" Enter a number \n =" );

                        scanf("%d%d",&a,&b);

                        sum=a+b;

                        printf("Addition of number are=%d",sum)

                        getch();

}

/* Output Screen :--


 Enter a number=             4

                                         6

Addition of number are= 10 */


                                                  


                                                           😀😟😏😘


syntax of c programming language







C language is developed by Dennis Ritchie.

Points to be remember while writing c program
1) every programming instruction must be returned within a main block.
2)All the instructions must be returned in a lowercase, because she is a case sensitive language it knows the difference between lowercase and uppercase.
3) every statement must be ended with a semicolon (;).
4)we May write constant variable or any user-defined thing in capital.


Steps to save ,compile and execute the program
1) save: File->save (F2) i.e first.c
2) compile and execute:Ctrol+F9
Note: if getch () is not there, then we can see the output screen using alt+F5, else directly we can see the output.
Example:

Syntax
Main ()
{           Clrscr();
             Printf("My first program in c.");
             getch ();
}
    Where
            Clrscr (): used to clear the screen.
            Printf ():  to display the text o value of variable on the                                                                     screen.
            getch ():  is used to hold output screen.                                    







Escape Sequences: is used to move the cursor on the particular position

'\n'(newline)           : is used to jump the cursor on the next line.
'\t'(tab)                   : to Move Cursor 5 characters along.
'\r'(carriage return):to move the cursor on the first character of the                                     current line.
'\b'(backspace)       : to jump the cursor one character left.







         

c program, Advance coding, c++ program, simple program, Advance language

online quiz Application project page MCA final year project

  Here we making a quiz application ppt presentation for college project so that our project idea will like to our professor and teacher  fi...