Computer programing w

23
Structure of Program:-

Transcript of Computer programing w

Page 1: Computer programing w

Structure of Program:-

Page 2: Computer programing w

Sum of the two Numbers:-

#include<stdio.h> int main() {Int a,b,c;Printf(“\n enter the value of a&b”);Scanf(“%d%d” &a,&b); c=a+b;Printf(“the sum is%d”,sum); return 0;}

Page 3: Computer programing w

Write a program calculate area of circle

#include <stdio.h> #include<conio.h> void main(){ float r;Printf(“enter the value of r”);Scanf(“%f”,&r);A=3.14*r*r;Printf(“\n the area of %d is” A) return 0;}

Page 4: Computer programing w
Page 5: Computer programing w
Page 6: Computer programing w
Page 7: Computer programing w

Program to print values as character and integers

Page 8: Computer programing w

Standard output:

Page 9: Computer programing w

Assignment Statement

Page 10: Computer programing w

Arithmatic operater

Page 11: Computer programing w

Arithmetic operators(cont’d)

Page 12: Computer programing w

Increment & Decrement operator

Page 13: Computer programing w

Solution: compute Volume

Page 14: Computer programing w

Exercise:

Page 15: Computer programing w
Page 16: Computer programing w
Page 17: Computer programing w
Page 18: Computer programing w
Page 19: Computer programing w

Arrays & pointer

Page 20: Computer programing w

Pointers

Page 21: Computer programing w

Fuctions

Page 22: Computer programing w

Structure & Unions

Page 23: Computer programing w

Attacking a projects