Advertisement
Pavle_nis

Nizovi stirngova

Mar 31st, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. // Nizovi stringova.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include<stdio.h>
  6.  
  7. int main()
  8. {
  9.     char prez[10][30];
  10.     int i, br = 0;
  11.     for (i = 0; i < 5; i++)
  12.         scanf("%s", prez[i]);
  13.     printf("Prezimena koja pocinju sa M su: \n");
  14.     for (i = 0; i < 10; i++)
  15.         if (prez[i][0] == 'M')
  16.         {
  17.             printf("%s\n", prez[i]);
  18.             br++;
  19.         }
  20.     printf("i ima ih: \n%d", br);
  21.     getch();
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement