Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main(void){
- char tomb[255];
- int szam=0;
- int i=0;
- int num[255];
- printf("Kerem az elso szamot:\n");
- while (true){
- getline(tomb, 255);
- szam = toi(tomb);
- printf("A szam:%d\n", szam);
- num[i] = szam;
- i++;
- if (i == 0){
- i++;
- continue;
- }
- else if (i>0 && tomb != "" || num[i] <= num[i - 1]){
- break;
- }
- }
- printf("Az utolso elotti negyzete:%d\n", num[i-1]*num[i-1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement