.... How to Find Your Subject Study Group & Join .... .... Find Your Subject Study Group & Join ....
We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)
[ + VU Study Groups Subject Code Wise ] [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]
Looking For Something at vustudents.ning.com?Search Here
I have made my first cs201 assignment someone please tell me how I submit it ?
Tags:
Share This With Friends......
Find Your Subject Study Group & Join.
+ Click Here To Join also Our facebook study Group.+ Prohibited Content On Site + Report a violation + Report an Issue
+ Safety Guidelines for New + Site FAQ & Rules + Safety Matters
+ Important for All Members Take a Look + Online Safety
sohail javaid (m.i.t 1st) upload it in CS201 assignment tab in your VULMS account...
rabia ya
tariq bhai just coding file upload karni hai na???
#include
int main()
{
using namespace std;
int X1, X2;
int Y1, Y2;
float slope, SlopX, SlopY;
cout "Enter The X-Coordinate of the starting point = ";
cin >> X1;
cout "Enter The Y-Coordinate of the starting point = ";
cin >> Y1;
cout "Enter the X-Coordinate of the Ending point = ";
cin >> X2;
cout "Enter the Y-Coordinate of the Ending point = ";
cin >> Y2;
SlopX = (X2 - X1);
SlopY = (Y2 - Y1);
slope = (SlopY) / (SlopX);
if(SlopX == 0){
cout "Line is parallel to Y-Axis" endl;
}
else {
if(SlopY == 0){
cout "Line is parallel to X-Axis" endl;
}
else {
if(slope == 1){
cout "Line will make the 45 degree angle with the horizon" endl;
}
else{
if(slope < 1){
cout "Line will travel more along X-Axis and Less along Y-Axis" endl;
}
else {
if(slope > 1){
cout "Line will travel more along Y-Axis and Less along X-Axis" endl;
}
}
}
}
}
system("pause");
return false;
}
one more
#include
#include
main()
{
//Declaring the variable;
int x1,x2,y1,y2;
float dy,dx,slope;
//Enter the value of satarting and ending point on x-axis and y-axis;
cout"Enter the X-Cordinate of the starting point=";
cin>>x1;
cout"Enter the Y-Cordinate of the starting point=";
cin>>y1;
cout"Enter the X-Cordinate of the ending point=";
cin>>x2;
cout"Enter the Y-Cordinate of the ending point=";
cin>>y2;
//calculate difference b/w x2 and x1;
dx=(x2-x1);
//calculate difference b/w y2 and y1;
dy=(y2-y1);
//calculate slope;
slope=(dy)/(dx);
if(dx==0)
{cout"Line is parallel to Y-Cordinate"endl;
}
else
{if(dy==0)
cout"Line is parallel to X-Corndinate"endl;
}
if(slope>1)
{cout"Line will travel more along Y-Axis and less along X-Axis"endl;
}
else
if(slope<1) {cout"Line will travel more along X-Axis and Less along Y-Axis"endl; } if(slope==1) {cout"Line will make the 45 degree angle with horizon"endl; } system("Pause") ; } #include
main()
{
// Declaring variables for input (x,y) and (x1,y1)
int a,b,c,d;
// Declaring variables for formula dx(x1 - x) and dy(y1 - y)
float m,x,y;
cout "Enter the X - Coordinate of the Starting point = ";
cin>> a;
cout "Enter the Y - Coordinate of the Starting point = ";
cin>> b;
cout "Enter the X - Coordinate of the Ending point = ";
cin>> c;
cout "Enter the Y - Coordinate of the Ending point = ";
cin>> d ;
// acording to formula dx(x1 - x)
x = c-a ;
// show message if the resualt (x1 - x)= 0
if (x==0)
{ cout "Line is parallel to Y - Axis ";
}
else
{
// show message if the resualt (y1 - y)= 0
y = d-b ;
if (y==0)
{ cout "Line is parallel to X - Axis ";
}
else
{
// show message if the resualt (dy/dx )= 1
m = y/x;
if (m==1)
{
cout "Line will make the 45 degree angle with the Horizon ";
}
else
{
// show message if the resualt dy/dx > 1
if (m>1)
{
cout "Line will travel more along Y- Axis And less along X- Axis" ;
}
// show message if the resualt dy/dx < 1
if (m<1) { cout "Line will travel more along X- Axis And less along Y- Axis" ; } } } } }
#include <iostream>
int main()
{
using namespace std;
int X1, X2;
int Y1, Y2;
float slope, SlopX, SlopY;
cout "Enter The X-Coordinate of the starting point = ";
cin >> X1;
cout "Enter The Y-Coordinate of the starting point = ";
cin >> Y1;
cout "Enter the X-Coordinate of the Ending point = ";
cin >> X2;
cout "Enter the Y-Coordinate of the Ending point = ";
cin >> Y2;
SlopX = (X2 - X1);
SlopY = (Y2 - Y1);
slope = (SlopY) / (SlopX);
if(SlopX == 0){
cout "Line is parallel to Y-Axis" endl;
}
else {
if(SlopY == 0){
cout "Line is parallel to X-Axis" endl;
}
else {
if(slope == 1){
cout "Line will make the 45 degree angle with the horizon" endl;
}
else{
if(slope < 1){
cout "Line will travel more along X-Axis and Less along Y-Axis" endl;
}
else {
if(slope > 1){
cout "Line will travel more along Y-Axis and Less along X-Axis" endl;
}
}
}
}
}
system("pause");
return false;
}
CS201 aSSIGNMENT SOL MAY 2013
#include<iostream.h>
#include<conio.h> main() { int d1,d2,e1,e2; float dx,dy; cout"Enter the X co-ordinate of the starting point="; cin>>1; cout"Enter the Y co-ordinate of the starting point="; cin>>e1; cout"Enter the X co-ordinate of the ending point="; cin>>2; dx=d2-d1; // condition if(dx==0) { // statement cout"Line is parallel to Y-axis"; } else { cout"Enter the Y co-ordinate of the ending point="; cin>>e2; dy=e2-e1; if(dy==0) cout"Line is parallel X-axis:"; else { if(dy/dx==1) cout"Line will make the 45 degree angle with the horizon"; if(dy/dx<1) cout"Line will travel more along X-axis and less along Y-axis"; if(dy/dx>1) cout"Line will travel more along Y-axis and less along X-axis"; } } getch(); } |
#include<iostream.h>
using namespace std;
main()
{
int x1, x2, y1, y2;
float sx, sy, s;
cout"X-Coordinate of the start point= ";
cin>>x1;
cout"Y-Coordinate of the start point= ";
cin>>y1;
cout"X-Coordinate of the ending point= ";
cin>>x2;
cout"Y-Coordinate of the ending point= "
cin>>y2;
coutendl;
sx=(x2-x1);
sy=(y2-y1);
s=sy/sx;
if(sx==0)
{
cout "Line is Parallel to Y"endl;
}
else
{
if (sy==0)
{cout"Line is Parallel to X"endl;
}
else
{
if(s==1)
{cout"45 degree angle with the horizon"endl;
}
else
{ if(s<1)
{cout"more along X-Axis and less along Y-Axis"endl;
}
else
{ if(s>1)
{cout"more along Y-Axis and less along X-Axis"endl;
}
}
}
}
}
coutendl;
system("PAUSE");
}
e.g., see attachmnt 4 help its not the exact sol. its just for idea for the file to be upload.....
Ye lo g right solution n plz tarik bhai isa chk krna kahin koi fault ha kya
#include <iostream>
int main()
{
int X1,X2;
int Y1,Y2;
float slope,dy,dx;
cout"Enter the X-coordinate of starting point:";
cin>>X1;
cout"Enter the Y-coordinate of starting point:";
cin>>Y1;
cout"Enter the X-coordinate of ending point:";
cin>>X2;
cout"Enter the Y-coordinate of endind point:";
cin>>Y2;
dy=(Y2-Y1);
dx=(X2-X1);
slope=dy/dx;
if
dy==0||dx==0
{
if dy==0
cout"Line is parallel to X-axis.";
else
cout"Line is parallel to Y-axis.";
} else
{ if slope==1
cout"Line will make the 45 angle with the horizone.";
else
{if slope<1
cout"Line will travel more along X-axis and less along Y-axis.";
else
cout"Line will travel more along Y-axis and less along X-axis.";
}
}
}
n plz koi mja ya compile kr k bta day k m program thek ha ya ni bcs mra compiler ma kch garbar ha n wo cin and cout ko undeclare function show kr rha ha
+ Job's & Careers (Latest Jobs)
+ Admissions (Latest Admissons)
+ Scholarship (Latest Scholarships)
+ Internship (Latest Internships)
+ VU Study
+ Other Universities/Colleges/Schools Help
::::::::::: More Categorizes :::::::::::
© 2018 Created by + M.Tariq Malik. Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on vustudents.ning.com don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com or Contact us at contact Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post