Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Programma che calcola la seguente espressione y=ax+b
- #include<stdio.h>
- #define FLUSH while(getchar()!='\n')
- int main()
- {
- int x, a, b, y; //variabili intere.
- a = 18, //Valore variabile a
- b = 7; //Valore variabile b
- printf("y=ax+b\n\n");
- printf("Inserisci valore di x: ");
- scanf("%d", &x);
- y = a*x + b;
- printf("y = %d\n", y);
- getchar();
- return 0;
- }
Add Comment
Please, Sign In to add comment