c++ - The output window closes after entering the input in C -
c++ - The output window closes after entering the input in C -
i wrote programme in c , after compiling , running output console not remain on after come in anything. programme requires come in distance , time.
my code here:
#include <stdio.h> int spd(int x , int y); int main() { int x,y; printf("enter distance first time in si units :\n"); scanf("%d",&x); scanf("%d",&y); printf("the speed required ",spd(x,y)); getch(); homecoming 0; } int spd(int x , int y) { homecoming x/y; }
try including header file : -
#include conio.h
c++ c
Comments
Post a Comment