Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char a;
- int b, c;
- do {
- printf("1. Zamiana stopni celcjusza na kelviny \n");
- printf("2. Zamiana stopni kelvina na celcjusza \n");
- printf("3. Wyjscie \n");
- scanf("%s", &a); /* a = getch(); */
- switch(a)
- {
- case '1': printf("Podaj temperature w stopniach celcjusza \n");
- scanf("%d", &b);
- printf("Temperatura w stopniach kelvina wynosi %d\n" , b + 273 );
- break;
- case '2': printf("Podaj temperature w stopniach kelvina \n");
- scanf("%d", &b);
- printf("Temperatura w stopniach celcjusza wynosi %d\n" , b - 273 );
- break;
- case '3': system ("pause");
- return 0;
- }
- }
- while ( a != 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement