Answer
\[y(x)=\sin x+C\cos x\]
Work Step by Step
$(1-y\sin x)dx-(\cos x)dy=0$ ___(1)
$(1-y\sin x)dx=(\cos x)dy$
$\Large\frac{dy}{dx}$= $\sec x-y\tan x$
$\Large\frac{dy}{dx}$ +$(\tan x)y=\sec x$
This is linear differential equation
Integrating factor:-
$I(x)=e^{\int\tan x\;dx}=e^{\ln|\sec x|}=\sec x$
Multiply (1) by $\sec x$
$\sec x\Large\frac{dy}{dx}$ +$\sec x\tan x\; y=\sec^2 x$
$\Large\frac{d}{dx}$ $[y\sec x]=\sec ^2 x$
Integrating,
$y\sec x=\int\sec^2 x\;dx+C$
$C$ is constant of integration
$y\sec x=\tan x +C$
$y=\sin x+C\cos x$
Hence general solution of (1) is $y(x)=\sin x+C\cos x$.