Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Number 1
- #include <stdio.h>
- int main()
- {
- int a[100] , i , n;
- printf("How many value?:\n");
- scanf("%d",&n); /// jotota value nibo ner man o toto
- for(i = 0; i < n; i++)
- {
- scanf("%d" ,&a[i]); /// Input nibar jonno loop
- }
- for(i = 0; i < n; i++)
- {
- printf("%d %d\n", i, a[i]); /// je index e je value insert hoiche seta print korbe
- }
- }
- ///Number 2
- #include <stdio.h>
- int main()
- {
- int a[100] ={1 , 2 , 3 , 4 ,5};
- for(i = 0; i < 5; i ++)
- {
- printf("%d ",a[i]); /// value ache 5 ta , tai 5 porjonto loop chalaichi
- }
- }
- ///Number 3
- #include <stdio.h>
- int main()
- {
- int a[100] ={1 , 2 , 3 , 4 ,5};
- printf("Number of array 2 index = %d\n", a[2]);/// array er 2 number index 3 print korse
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement